Skip to content

Conversation

@freimair
Copy link

@freimair freimair commented May 8, 2024

Built upon work of @polarmutex and #103 but on a per-game basis.

Combine that with a bit of gnuplot magic, one can track ones progress visually after creating a symlink to the actual logfile eg.

ln -s ~/.local/share/nvim/VimBeGoodStats_games.log stats.log

and running gnuplot with something like:

set datafile separator ','

myTimeFmt = "%Y-%m-%d %H:%M:%S"
set timefmt myTimeFmt

set title "VimBeGood Stats"
set grid
set tics nomirror
set border 11
set xdata time
set xlabel 'Date/Time'
set xtics format myTimeFmt
set xtics rotate
set ylabel 'Time in Seconds'
set yrange [0:]
set y2label 'Success rate'
set y2range [0:1.1]
set y2tics

plot '<(sed "/words/!d" stats.log)' using (strftime(myTimeFmt, $1)):5:7:8 with errorlines title "words" lt rgb "red", \
	'' using (strftime(myTimeFmt, $1)):4 axis x1y2 with linespoints title "words success rate" lt rgb "red", \
	'<(sed "/ci{/!d" stats.log)' using (strftime(myTimeFmt, $1)):5:7:8 with errorlines title "ci{" lt rgb "blue", \
	'' using (strftime(myTimeFmt, $1)):4 axis x1y2 with linespoints title "ci{ success rate" lt rgb "blue", \
	'<(sed "/relative/!d" stats.log)' using (strftime(myTimeFmt, $1)):5:7:8 with errorlines title "relative" lt rgb "green", \
	'' using (strftime(myTimeFmt, $1)):4 axis x1y2 with linespoints title "relative success rate" lt rgb "green", \
	'<(sed "/hjkl/!d" stats.log)' using (strftime(myTimeFmt, $1)):5:7:8 with errorlines title "hjkl" lt rgb "grey", \
	'' using (strftime(myTimeFmt, $1)):4 axis x1y2 with linespoints title "hjkl success rate" lt rgb "grey", \
	'<(sed "/whackamole/!d" stats.log)' using (strftime(myTimeFmt, $1)):5:7:8 with errorlines title "whackamole" lt rgb "orange", \
	'' using (strftime(myTimeFmt, $1)):4 axis x1y2 with linespoints title "whackamole success rate" lt rgb "orange"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant