-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add a debug page with basic information about split store (#10182)
Add a new debug page: `/debug/pages/split_store` This page provides basic information about the state of split store. An example report looks like this: ![image](https://github.com/near/nearcore/assets/149345204/2ec1cfc1-7e31-4a1d-a37c-e843fbf89c81) Fixes: #9549
- Loading branch information
1 parent
ee9c6ea
commit bfb3b58
Showing
5 changed files
with
63 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<html> | ||
|
||
<head> | ||
<title> Split Store </title> | ||
</head> | ||
|
||
<body> | ||
<h1> | ||
Split Store | ||
</h1> | ||
|
||
<ul> | ||
<li> Head height: <span id="head-height"></span></li> | ||
<li> Cold head height: <span id="cold-head-height"></span></li> | ||
<li> Final head height: <span id="final-head-height"></span></li> | ||
<li> Hot db kind: <span id="hot-db-kind"></span></li> | ||
</ul> | ||
|
||
<script> | ||
document.body.onload = async () => { | ||
response = await fetch("../api/split_store_info") | ||
response_json = await response.json() | ||
info = response_json['status_response']['SplitStoreStatus'] | ||
|
||
document.getElementById("head-height").textContent = String(info["head_height"]) | ||
document.getElementById("cold-head-height").textContent = String(info["cold_head_height"]) | ||
document.getElementById("final-head-height").textContent = String(info["final_head_height"]) | ||
document.getElementById("hot-db-kind").textContent = String(info["hot_db_kind"]) | ||
} | ||
</script> | ||
</body> | ||
|
||
</html> |
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