BartoszCoyote/GoPomodoro

Pomodoro stats

michal-franc opened this issue · 0 comments

Calculate full pomodoros and keep the stats in file? (we dont need fully fledged DB)

pomodoro stat:

  • timestamp
  • isFinished

Requirements:

  • there won't be many read/writes so performance is not important
    • 1 write every 30-60 min
    • reads on stats graphing/building on demand
    • for json read of whole document on each write?
      • we could potentially go to the end of file find } or ] and also append without parsing but it is complexity
    • for csv we can just append the file
  • it should be easilly extensible so that if we introduce new stat we wont have to migrate the file
  • we can expect <10 data points a day
    • 200 per month
    • 2000 per year
    • we can easilly compact data later on if we need to

folder/ file structure

\.GoPomodoro
 \stats
   \day or week or month-year.(json|csv)
 GoPomodoro.env

json

  • extensible - it would be easy to add new value to record
  • readable
  • nice support in golang

append new line csv

  • extensible - it would be easy to add new record to record - just add new column in csv order
  • not so readable

Graphing package ideas: