This PR adds a new request_duration_seconds metrics, which records a histogram of the request latency, partitioned by status code and HTTP method.
This PR also refactors other parts of the metrics.go file.
(technically, the PR is for request_duration_seconds, so anything other than that should be omitted... or change the PR title and description)
Is it possible to query the database once, yielding all counts for all types and states?
I tried to find this, but thought it was not not possible. I have retried searching for this and found this: https://stackoverflow.com/a/19046871/5207081
That would fix this.
Ran this query on the test migration database:
sqlite> SELECT type, state, COUNT(*) FROM pastes GROUP BY type, state;
0|2|136 // type: undef state: deleted
2|1|118 // type: redirect state: present
3|1|1376 // type: fileupload state: present
Would that roughly be what you expect to get here?
See the other review comments.
No due date set.
This pull request currently doesn't have any dependencies.
Deleting a branch is permanent. It CANNOT be undone. Continue?