Skip to content

fix: handle new agent stat format correctly #14576

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

Merged
merged 7 commits into from
Sep 19, 2024
Merged

Conversation

f0ssel
Copy link
Contributor

@f0ssel f0ssel commented Sep 5, 2024

Closes #14348

@ethanndickson ethanndickson marked this pull request as ready for review September 18, 2024 06:20
Copy link
Contributor Author

@f0ssel f0ssel left a comment

Choose a reason for hiding this comment

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

Looks good so far, would like us to ensure summing and filtering is checked a little deeper, but that shouldn't be too bad since the hard part of getting the mocks accurate is done. Have you tried running it in dev with the experiment on? You can try to repro the screenshot in the issue and see if you can data back.

Copy link
Contributor Author

@f0ssel f0ssel left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for double checking on a dev instance as well. I can't approve since it's "my" pr, but feel free to approve yourself and merge when ready.

@@ -150,7 +150,7 @@ func TestCache_BuildTime(t *testing.T) {
},
},
transition: database.WorkspaceTransitionStop,
}, want{50 * 1000, true},
Copy link
Contributor Author

Choose a reason for hiding this comment

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

What makes this change needed?

Copy link
Member

Choose a reason for hiding this comment

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

The old dbmem tryPercentile function was implemented slightly differently to how postgres implements PERCENTILE_CONT (although this test never gets run with postgres anyway)

@ethanndickson ethanndickson merged commit 922f4c5 into main Sep 19, 2024
28 checks passed
@ethanndickson ethanndickson deleted the f0ssel/agent-stats-zero branch September 19, 2024 15:52
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

coderd_agentstats_session_count_* are not being populated
2 participants