-
Notifications
You must be signed in to change notification settings - Fork 286
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsql-server,admin: add top-k queries to stats
Top 10 most expensive queries are now stored and available in the admin api: ``` $ curl -s http://localhost:8081/v1/namespaces/default/stats | jq '.top_queries' [ { "weight": 1, "rows_written": 0, "rows_read": 1, "query": "SELECT 1;" }, { "weight": 1, "rows_written": 0, "rows_read": 1, "query": "SELECT 42;" }, { "weight": 3, "rows_written": 0, "rows_read": 3, "query": "SELECT * FROM sqlite_master;" } ] ```
- Loading branch information
Showing
3 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters