src-d / hercules

Gaining advanced insights from Git repository history.
Other
2.63k stars 334 forks source link

Feature Request: Ability to specify a timerange for analysis #287

Closed DrEsteban closed 5 years ago

DrEsteban commented 5 years ago

For developers that have annual/semi-annual reviews, they may want the ability to show burndowns for a specific time range. That is, show me my stats for the last "review period". Rather than calculating the stats for the entire lifetime of the project.

vmarkovtsev commented 5 years ago

@DrEsteban there are --start-date and --end-date, will they help in this case?

DrEsteban commented 5 years ago

@vmarkovtsev Oh! I didn't realize those were existing options. I can't find them anywhere in the helptext hercules --help. My version is:

Version: 10
Git:     3b04d23caccc40d1ca8ffcd7f62669b3ff36a1ed
vmarkovtsev commented 5 years ago

That's the plotting layer, labours

danielcorreia96 commented 5 years ago

In case @DrEsteban wants to reduce the analysis overhead of hercules (instead of labours), I ran into a similar problem recently where I wanted to run couples analyses for specific date intervals.

I solved it using --since + --until on git rev-list and followed the suggestion in the README for passing a file list of commits.

File Couples Example (assuming current directory is the target repository): git rev-list --since="2018-03-01" --until="2019-03-01" HEAD | tac | hercules --commits - --couples . | tee output.yaml

Ref: https://git-scm.com/docs/git-rev-list#Documentation/git-rev-list.txt---sinceltdategt

vmarkovtsev commented 5 years ago

I guess that the issue has been resolved. Please ping here if there is still something unclear.