-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit 66ee98d
committed
[PLAT-17751] Add total ops and latency metrics as the sum over YSQL and YCQL
Summary:
This diff adds `total_ysql_ycql_ops_per_sec` and `total_ysql_ycql_ops_latency` metrics as the sum of them over both ysql and ycql.
In a separate UI diff, these metrics will be shown on the main universe details page.
Test Plan:
Created a universe and ran insert queries on the universe. Then, ran the metric api for the added metrics and made sure the proper values are returned:
```
{
"total_ysql_ycql_ops_per_sec":{
"queryKey":"total_ysql_ycql_ops_per_sec",
"layout":{
"title":"Total Ops / Sec (YSQL + YCQL)",
"xaxis":{
"type":"date",
"alias":{
}
}
},
"directURLs":[
"http://localhost:9090/graph?g0.expr=sum%28avg_over_time%28rpc_irate_rps%7Bexport_type%3D%7E%22ysql_export%7Ccql_export%22%2C+service_type%3D%22SQLProcessor%22%2C+node_prefix%3D%22yb-admin-hzare-gcp-3-src%22%2C+server_type%3D%7E%22yb_ysqlserver%7Cyb_cqlserver%22%2C+service_method%3D%7E%22SelectStmt%7CInsertStmt%7CUpdateStmt%7CDeleteStmt%22%7D%5B30s%5D%29%29+by+%28service_method%29&g0.tab=0&g0.range_input=3600s&g0.end_input=2025-05-30 21:59:00&g0.step_input=30"
],
"metricsLinkUseBrowserFqdn":true,
"data":[
{
"name":"DeleteStmt",
"metricName":"rpc_irate_rps",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
]
},
{
"name":"InsertStmt",
"metricName":"rpc_irate_rps",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
"0.20062192797672787",
"0.06641429235571494",
"0.033296706955682084",
"0.06660340158633274",
"0.03330336030905519",
"0.03333333333333334",
"0.033323336332433603",
"0.0999666873220064",
"0.06664335498298031",
"166.72018572540333",
"123.55501590189357",
"210.24181860920578",
"166.77825276346016",
"181.8228192503503",
"219.08370204441474",
"172.90614623685667",
"212.4961329649578",
"213.6384769138522",
"167.07424862869414",
"171.90531772785252",
"166.79101971982334",
"166.45909396761374",
"179.8499402781175",
"226.24164762644853",
"190.35085244637185",
"216.9621083896177",
"186.22450814870393",
"0.03333333333333334",
"0.06666000066660002",
"0.06654689288784035",
"0.03338675213675214",
"0.033290056260195086",
"0.06664001066240172",
"0.06663003363333331",
"0.033290056260195086",
"0.033256842595364",
"0.1333607306205498",
"38.37025995252626",
"157.9694350600105",
"136.9836640144454",
"166.7190286179031",
"158.29353337218515"
]
},
{
"name":"SelectStmt",
"metricName":"rpc_irate_rps",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
]
},
{
"name":"UpdateStmt",
"metricName":"rpc_irate_rps",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0"
]
}
]
},
"total_ysql_ycql_ops_latency":{
"queryKey":"total_ysql_ycql_ops_latency",
"layout":{
"title":"Average Latency (YSQL + YCQL)",
"xaxis":{
"type":"date",
"alias":{
}
},
"yaxis":{
"alias":{
},
"ticksuffix":" µs"
}
},
"directURLs":[
"http://localhost:9090/graph?g0.expr=%28sum%28rate%28rpc_latency_sum%7Bexport_type%3D%7E%22ysql_export%7Ccql_export%22%2C+service_type%3D%22SQLProcessor%22%2C+node_prefix%3D%22yb-admin-hzare-gcp-3-src%22%2C+server_type%3D%7E%22yb_ysqlserver%7Cyb_cqlserver%22%2C+service_method%3D%7E%22SelectStmt%7CInsertStmt%7CUpdateStmt%7CDeleteStmt%22%7D%5B30s%5D%29%29+by+%28service_method%29%29+%2F+%28sum%28rate%28rpc_latency_count%7Bexport_type%3D%7E%22ysql_export%7Ccql_export%22%2C+service_type%3D%22SQLProcessor%22%2C+node_prefix%3D%22yb-admin-hzare-gcp-3-src%22%2C+server_type%3D%7E%22yb_ysqlserver%7Cyb_cqlserver%22%2C+service_method%3D%7E%22SelectStmt%7CInsertStmt%7CUpdateStmt%7CDeleteStmt%22%7D%5B30s%5D%29%29+by+%28service_method%29%29&g0.tab=0&g0.range_input=3600s&g0.end_input=2025-05-30 21:59:00&g0.step_input=30"
],
"metricsLinkUseBrowserFqdn":true,
"data":[
{
"name":"DeleteStmt",
"metricName":"rpc_latency.avg",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"name":"InsertStmt",
"metricName":"rpc_latency.avg",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
"11712.5",
0,
"10949.314696844785",
"11364",
"10727.693675444518",
0,
"10678",
"17360",
"10590.567073170734",
"1453.2212691196044",
"1517.7216300953094",
"1493.4082",
"1580.7742669166328",
"1823.0474077142437",
"1538.6860695323628",
"1938.9838",
"1504.179058758006",
"1465.0176205859145",
"1530.975499166814",
"1889.8097926493504",
"2384.310506881504",
"2081.2005334961946",
"2071.506721621617",
"2009.2180381218038",
"2015.4301971522323",
"1503.1775337451384",
"1955.1592408267054",
0,
"10924",
"13144.999999999998",
"11655.527224934283",
0,
"10981",
"11301",
"11638.248520266727",
0,
"12035.12583245798",
"1976.0567190226877",
"1991.441436486004",
"1992.7170515037492",
"2011.004086451694",
"1938.4605312383092"
]
},
{
"name":"SelectStmt",
"metricName":"rpc_latency.avg",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
},
{
"name":"UpdateStmt",
"metricName":"rpc_latency.avg",
"type":"scatter",
"x":[
1748641110000,
1748641140000,
1748641170000,
1748641200000,
1748641230000,
1748641260000,
1748641290000,
1748641320000,
1748641350000,
1748641380000,
1748641410000,
1748641440000,
1748641470000,
1748641500000,
1748641530000,
1748641560000,
1748641590000,
1748641620000,
1748641650000,
1748641680000,
1748641710000,
1748641740000,
1748641770000,
1748641800000,
1748641830000,
1748641860000,
1748641890000,
1748641920000,
1748641950000,
1748641980000,
1748642010000,
1748642040000,
1748642070000,
1748642100000,
1748642130000,
1748642160000,
1748642190000,
1748642220000,
1748642250000,
1748642280000,
1748642310000,
1748642340000
],
"y":[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
}
]
}
}
```
Reviewers: amalyshev, rmadhavan, nbhatia, daniel
Reviewed By: amalyshev
Differential Revision: https://phorge.dev.yugabyte.com/D444201 parent 4d9181a commit 66ee98dCopy full SHA for 66ee98d
File tree
Expand file treeCollapse file tree
6 files changed
+402
-139
lines changedFilter options
- managed
- src
- main/resources
- metric
- test/java/com/yugabyte/yw/commissioner/tasks
- ui/src/components/metrics/OverviewMetrics
Expand file treeCollapse file tree
6 files changed
+402
-139
lines changed
0 commit comments