Skip to content

Commit

Permalink
[#403] print the changes per green commit in stats
Browse files Browse the repository at this point in the history
To generate a retro file template containing stats about the green and red commits
- call the print method on the changes in green commit
- update the tests
  • Loading branch information
philou authored and mengdaming committed Oct 22, 2024
1 parent 574fa9e commit 51d2191
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/stats/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ func Print(branch string, tcrEvents events.TcrEvents) {
printStatMinMaxAvg("Time between commits", tcrEvents.TimeBetweenCommits())
printStatMinMaxAvg("Changes per commit (src)", tcrEvents.SrcLineChangesPerCommit())
printStatMinMaxAvg("Changes per commit (test)", tcrEvents.TestLineChangesPerCommit())
printStatMinMaxAvg("Changes per green commit", tcrEvents.AllLineChangesPerGreenCommit())
printStatEvolution("Passing tests count", tcrEvents.PassingTestsEvolution())
printStatEvolution("Failing tests count", tcrEvents.FailingTestsEvolution())
printStatEvolution("Skipped tests count", tcrEvents.SkippedTestsEvolution())
Expand Down
1 change: 1 addition & 0 deletions src/stats/printer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ func Test_print_all_stats(t *testing.T) {
"- Time between commits: 26m37s (min) / 38m59s (avg) / 51m21s (max)",
"- Changes per commit (src): 1 (min) / 5 (avg) / 10 (max)",
"- Changes per commit (test): 0 (min) / 1.3 (avg) / 3 (max)",
"- Changes per green commit: 13 (min) / 13 (avg) / 13 (max)",
"- Passing tests count: 2 --> 8",
"- Failing tests count: 1 --> 2",
"- Skipped tests count: 5 --> 1",
Expand Down

0 comments on commit 51d2191

Please sign in to comment.