Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(insights): add insights tab to repo view #832

Merged
merged 9 commits into from
Jan 8, 2025
Merged

Conversation

wass3r
Copy link
Collaborator

@wass3r wass3r commented Jan 3, 2025

adds a new page/tab at the repo-level called insights. it's sort of a continuation of a hackathon effort from a few years ago (hackathon/insights). the page provides repo-level metrics over the last seven days (hard coded). it does so by querying for all builds over the time span and doing client-side calculations. the metrics cover build activity, build duration, reliability, and queue time.

Important

this implementation is not final, but more-so serves as a preview and/or discussion on what this could look like while being a deploy-able deliverable. probably, in its final form, the data should be generated/stored on the backend/database with dedicated endpoints that provide the calculated data.

high-level changes:

  • add "tryAll" endpoint for builds and add support for after parameter
  • add insights page
  • add barchart component (uses elm-visualization)
  • add helpers for calculating metrics
  • add cypress/elm tests (refactored one as well)

metrics provided:

  • build activity (per day, avg builds per day, avg deployments per day)
  • build duration (avg per day, average/std dev/median over time, time used on failed builds)
  • build reliability (avg success rate per day, success/failure rate over time span, avg time to recovery from failure)
  • queue performance (avg time in queue per day, average/median over time span)

the following are some examples based on fake build data:

insights screenshot

insights_interactivity.mp4

Tip

Reminder for reviewers: changes in Main.elm, Main/Pages/Model.elm, Main/Pages/Msg.elm, Route/Path.elm are auto-generated.

opportunities beyond this PR:

  • select timeframe - 7/30/90 day (for example)
  • filter by branch/event (and others?)
  • plenty more (you tell me...)

@wass3r wass3r requested a review from a team as a code owner January 3, 2025 21:38
@wass3r wass3r changed the title feat(insights): add insights page to repo view feat(insights): add insights tab to repo view Jan 4, 2025
@wass3rw3rk
Copy link
Member

@plyr4 addressed the feedback! thanks for taking a look.

@wass3rw3rk wass3rw3rk requested a review from plyr4 January 6, 2025 20:41
Copy link
Contributor

@KellyMerrick KellyMerrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@wass3rw3rk wass3rw3rk merged commit c633f97 into main Jan 8, 2025
13 checks passed
@wass3rw3rk wass3rw3rk deleted the feat/insights branch January 8, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants