- Notifications
You must be signed in to change notification settings - Fork928
feat(coderd/database): adddbrollup
service to rollup insights#12665
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
mafredri commentedMar 19, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
5a49791
toc9fe7c5
Compare6364b79
todcc3811
Compare
johnstcn left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍 once CI is happy
@@ -0,0 +1,127 @@ | |||
package dbrollup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I see a potential abstraction here -- the PR I'm working on in parallel#12659 has a similar logic of "run a query every interval". There are definitely other areas of the codebase that could benefit from a similar framework.
} | ||
} | ||
func (r *Rolluper) Close() error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Is the error return value here to satisfy an interface? Do we need it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Yeah, I feel the io.Closer interface is so common it's worth using this signature even if the error is not used at the moment or ever in the future.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
c9fe7c5
to46bc0f0
Compare7fc6fb5
to91fb8e4
Compareb64c291
tob3bdea2
Compare32a5d2c
toe77ca25
Comparedf37ae9
tocafcc7b
Compare28c5885
to4374753
Compare8f207e3
to310f545
Compare4374753
to7145189
Compare310f545
tofc0b87c
Compare7145189
toc2926ef
Comparefc0b87c
tocba0c08
Comparec2926ef
to8ccae5f
Comparecba0c08
to8b96a59
Compare8ccae5f
toc8221f3
Comparemafredri commentedMar 22, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
c8221f3
to2040b87
Compare
Uh oh!
There was an error while loading.Please reload this page.
This PR adds the dbrollup service that runs the
UpsertTemplateUsageStats
query every 5 minutes, on the minute. This allows us to have fairly real-time data when viewing "today".