Skip to content
This repository was archived by the owner on Oct 18, 2023. It is now read-only.

Conversation

MarinPostma
Copy link
Contributor

@MarinPostma MarinPostma commented Mar 29, 2023

This PR introduces the GET /v1/stats route that return the total amount of rows read/written by an instance:

{
    "rows_read_count": 0,
    "rows_written_count": 0
}

The number of rows read/written persists accross restarts, thanks to a sync loop that flushes the information to disk about every 5s.

@MarinPostma MarinPostma force-pushed the stats-route branch 3 times, most recently from f7b93ef to 119c4a2 Compare March 29, 2023 16:38
@MarinPostma MarinPostma marked this pull request as draft March 29, 2023 16:41
@MarinPostma
Copy link
Contributor Author

@psarna I just need a libsql bump pls 🙏

@MarinPostma MarinPostma force-pushed the stats-route branch 2 times, most recently from be8ddcf to 851b89c Compare March 29, 2023 18:11
@penberg
Copy link
Contributor

penberg commented Mar 29, 2023

Looks good @MarinPostma!

psarna added 2 commits March 30, 2023 08:44
Now that they are available in the rusqlite branch,
let's use the metrics in a proper way instead of hacking
it with std::mem::transmute.
@MarinPostma MarinPostma marked this pull request as ready for review March 30, 2023 06:48
@MarinPostma
Copy link
Contributor Author

bors merge

@bors
Copy link
Contributor

bors bot commented Mar 30, 2023

Build succeeded:

@bors bors bot merged commit 90c96ba into main Mar 30, 2023
@MarinPostma MarinPostma deleted the stats-route branch August 25, 2023 13:03
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.

3 participants