lichess-org/fishnet

an option to add the timestamps for the stats output?

lazydroid opened this issue · 7 comments

I'm running the fishnet from the command line, and would really appreciate if the messages have the timestamps like in logs, with the date and time on the left side of the screen:

2021-03-24 12:34:56 ><> fishnet etc.

i don't want to ruin the experience for others who don't like this, so maybe a command line switch to turn on the timestamps?

This can be achieved with composition in Unix fashion. See https://unix.stackexchange.com/questions/26728/prepending-a-timestamp-to-each-line-of-output-from-a-command.

Or without any extra utility:

./fishnet | while read line; do echo "[`date -Iseconds`] $line"; done

thanks!

Things break around fishnet logo, it's not critical, but you may look into that if you want:

$ ./fishnet-x86_64-unknown-linux-gnu | while read line; do echo "[`date -Iseconds`] $line"; done
[2021-03-24T16:33:51+09:00] #   _________         .    .
[2021-03-24T16:33:51+09:00] #  (..       _    ,  |  /|
[2021-03-24T16:33:51+09:00] #          O    /|   / /
[2021-03-24T16:33:51+09:00] #    ______    / |     /      _____ _     _     _   _      _
[2021-03-24T16:33:51+09:00] #       vvvv     |   /  |     |  ___(_)___| |__ |  | | ___| |_
[2021-03-24T16:33:51+09:00] #       ^^^^  ==   _/   |     | |_  | / __| '_ |  | |/ _  __|
[2021-03-24T16:33:51+09:00] #        `_   ===    .  |     |  _| | __  | | | |  |  __/ |_
[2021-03-24T16:33:51+09:00] #        / /_    /      |     |_|   |_|___/_| |_|_| _|___|__| 2.2.6
[2021-03-24T16:33:51+09:00] #        |/   _  |      /
[2021-03-24T16:33:51+09:00] #               ________/      Distributed Stockfish analysis for lichess.org

if you start fishnet via systemd:
journalctl -f -u fishnet
may be a solution for you

-- example output --
Mar 24 03:11:24 lichess fishnet-x86_64-unknown-linux-gnu[14289]: [=====|==== ] https://lichess.org/8v1q4wUD finished (4573 knps)
Mar 24 03:11:27 lichess fishnet-x86_64-unknown-linux-gnu[14289]: [== | ] https://lichess.org/jPwd0oag finished (6402 knps)
Mar 24 03:11:29 lichess fishnet-x86_64-unknown-linux-gnu[14289]: [ | ] https://lichess.org/mEuaD8Da finished (12251 knps)

thank you, jim! actually I asked this question because not all lines are born equal, those that have game URL and are output with '\r' on the end don't need a time stamp, only those that start with ><> sign =)

i really miss the python version where I could make those simple changes myself.

Well that is a horse of a different color :-) . Whle I didnt parse out the datestamp in the journal, this appeared to be close :
journalctl -f -u fishnet| grep '><>'
I learned to love the new version of fishnet when I saw how well it used all the cores I was donating. And the rational to have a verifiable build makes sense to me.

@jim-perkins re: cores, i liked the previous version better. it seemed to scale the load more smoothly, allowing the CPU fans to pick up the speed, the recent version warms the cores up to 80'C instantly, then drops at once. probably this is not applicable to the people who run analysis 24/7 non-stop, but for the little guys picking up the slack when there are extra jobs to do this makes a difference.