Home how it works
Post
Cancel

how it works

The process runs a git log command and then analyzes the results, of your commits. The default is the current fit user. For more information see options.

Calculating work sessions

Two settings are used to calculate the session from the logs:

  • max-diff-for-session - maximum difference in minutes between commits counted to one session. Default: 120
  • min-session = how many minutes the first commit of a session should add to total. Default: 30

Imaging this is your work day, and the circles represent the commits over time:

commits across the day

The calculation is like this:

  1. We check the time differences between commits:

commits across the day

  1. If the diffrence is less than the value of max-diff-for-session, than the commits are grouped to one work session. If the difference is greater, than they are on different session.

commits across the day

  1. Each work session is added with the min-session value, to represent the time spent before the first commit.

commits across the day

  1. Work sessions that are on the same date are grouped together to form a work day:

commits across the day

Result

The work days are concluded in a table ike this:

DayHoursDetails
20.15First commit message; second commit;
21.14MyBranch_name#1; Mybranch_Name#2
23.37Featurebranch#114

The table contains a summary for all days, for each month, and total. The months are arranged by year.

Details

The detail column contains only partial information received from the git log:

  • branch names if are any (until a certain limit of characters per day)\
  • commit messages (until a certain limit of characters per day)
This post is licensed under CC BY 4.0 by the author.
Contents