Skip to content

Instantly share code, notes, and snippets.

@adg29
Last active November 5, 2019 18:59
Show Gist options
  • Save adg29/a1a432f3c01c147f90ed13434a0ac117 to your computer and use it in GitHub Desktop.
Save adg29/a1a432f3c01c147f90ed13434a0ac117 to your computer and use it in GitHub Desktop.
Git Commit Log – Visualizing Changes
  1. Export your Git log to a .txt file from your project directory with git log --numstat >filename.txt
  2. Upload and import your Git log .txt file into eazyBI
  3. Create or import a report definition. Examples below
    1. Changes by Week Day and Hour https://eazybi.com/accounts/9041/cubes/Git%20Commits/reports/42597-git-commit-log-changes-by-week-day-and-hour
    2. Changes by Hour of Day https://eazybi.com/accounts/9041/cubes/Git%20Commits/reports/42592-git-commit-log-changes-by-hour-of-day

References

{
"cube_name": "Git Commits",
"cube_reports": [ {
"name": "Git Commit Log – Changes by Hour of Day",
"result_view": "bar_chart",
"definition": {"columns":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Changes]","[Measures].[Commits]","[Measures].[Changes per commit]"],"members":null}]},"rows":{"dimensions":[{"name":"Hour","selected_set":["[Hour].[Hour].Members"],"members":null,"bookmarked_members":null}]},"pages":{"dimensions":[{"name":"File","selected_set":["[File].[All Files]"],"members":[{"depth":0,"name":"All Files","full_name":"[File].[All Files]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[File].[All Files]"]},{"name":"File Extension","selected_set":["[File Extension].[All File Extensions]"],"members":[{"depth":0,"name":"All File Extensions","full_name":"[File Extension].[All File Extensions]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[File Extension].[All File Extensions]"]},{"name":"Time","selected_set":["[Time].[All Times]"],"members":[{"depth":0,"name":"All Times","full_name":"[Time].[All Times]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[Time].[All Times]"]},{"name":"Week Day","selected_set":["[Week Day].[All Week Days]"],"members":[{"depth":0,"name":"All Week Days","full_name":"[Week Day].[All Week Days]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[Week Day].[All Week Days]"]},{"name":"Author","selected_set":["[Author].[All Authors]"],"members":[{"depth":0,"name":"All Authors","full_name":"[Author].[All Authors]","drillable":true,"type":"all"}],"bookmarked_members":null,"current_page_members":["[Author].[All Authors]"]}]},"options":{},"view":{"current":"bar_chart","maximized":true,"bar_chart":{"stacked":false,"vertical":true,"swap_axes":false,"data_labels":false,"series_options":{"Commits":{"separateAxis":true,"type":"spline","color":"#F79232"},"Changes per commit":{"separateAxis":true,"type":"spline","color":"#6795C4","symbol":"circle"},"Changes":{"color":"#707070"}}},"table":{}}}
} ],
"calculated_members": [{"dimension":"Measures","name":"Changes","format_string":"#,##0","formula":"[Measures].[Additions] + [Measures].[Deletions]","annotations":{"group":"Default"}},{"name":"Changes per commit","dimension":"Measures","formula":"CASE WHEN [Measures].[Commits] \u003e 0 THEN\n [Measures].[Changes] / [Measures].[Commits]\nEND","format_string":"#,##0.00"}]
}
{
"cube_name": "Git Commits",
"cube_reports": [ {
"name": "Git Commit Log – Changes by Week Day and Hour",
"result_view": "bar_chart",
"definition": {"columns":{"dimensions":[{"name":"Hour","selected_set":["[Hour].[Hour].Members"],"members":null,"bookmarked_members":null}]},"rows":{"dimensions":[{"name":"Week Day","selected_set":["[Week Day].[Week Day].Members"],"members":null,"bookmarked_members":null}]},"pages":{"dimensions":[{"name":"Measures","selected_set":["[Measures].[Commits]","[Measures].[Changes]","[Measures].[Changes per commit]"],"members":[{"depth":0,"name":"Commits","full_name":"[Measures].[Commits]","drillable":false}],"current_page_members":["[Measures].[Commits]"]},{"name":"Time","selected_set":["[Time].[All Times]"],"members":[{"depth":0,"name":"All Times","full_name":"[Time].[All Times]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[Time].[All Times]"]},{"name":"File","selected_set":["[File].[All Files]"],"members":[{"depth":0,"name":"All Files","full_name":"[File].[All Files]","drillable":true,"type":"all","expanded":true,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[File].[All Files]"]},{"name":"Author","selected_set":["[Author].[All Authors]"],"members":[{"depth":0,"name":"All Authors","full_name":"[Author].[All Authors]","drillable":true,"type":"all","expanded":false,"drilled_into":false}],"bookmarked_members":null,"current_page_members":["[Author].[All Authors]"]}]},"options":{"nonempty":true},"view":{"current":"bar_chart","maximized":true,"bar_chart":{"stacked":true,"vertical":true,"swap_axes":true,"data_labels":false,"series_options":{"Monday":{"color":"#6795C4"},"Tuesday":{"color":"#AAC458"},"Wednesday":{"color":"#DC7369"},"Thursday":{"color":"#F8D271"},"Friday":{"color":"#F1A257"},"Saturday":{"color":"#9AB9D8"},"Sunday":{"color":"#E8A29B"}}},"table":{}}}
} ],
"calculated_members": [{"dimension":"Measures","name":"Changes","format_string":"#,##0","formula":"[Measures].[Additions] + [Measures].[Deletions]","annotations":{"group":"Default"}},{"name":"Changes per commit","dimension":"Measures","formula":"CASE WHEN [Measures].[Commits] \u003e 0 THEN\n [Measures].[Changes] / [Measures].[Commits]\nEND","format_string":"#,##0.00"}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment