-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathkv_90th_throughput.ts
More file actions
85 lines (80 loc) · 3.18 KB
/
kv_90th_throughput.ts
File metadata and controls
85 lines (80 loc) · 3.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
import {
EmbeddedScene,
SceneFlexLayout,
SceneFlexItem,
SceneVariableSet,
} from '@grafana/scenes';
import { PanelBuilders } from '@grafana/scenes';
import { ShowfastQueryBuilder, createShowfastQueries } from '../../../utils/utils.showfast';
/**
* Creates a dynamic KV throughput dashboard using the ShowfastQueryBuilder
* This dashboard shows performance metrics from external APIs via Showfast
*/
export function kvThroughputDashboard(): EmbeddedScene {
// Create template variables for dynamic metric selection
const variables = ShowfastQueryBuilder.buildVariableSet(['kv']);
return new EmbeddedScene({
$variables: variables,
body: new SceneFlexLayout({
minHeight: 50,
direction: 'row',
wrap: 'wrap',
children: [
// KV Max Ops Performance Panel
new SceneFlexItem({
height: 400,
width: '50%',
minWidth: '45%',
body: PanelBuilders.barchart()
.setTitle('KV Max Ops Performance')
.build(),
$data: new ShowfastQueryBuilder('kv', 'max_ops')
.setVisualizationType('barchart')
.useTimelineData(true)
.buildQueryRunner()
}),
// KV Max Ops SSL Performance Panel
new SceneFlexItem({
height: 400,
width: '50%',
minWidth: '45%',
body: PanelBuilders.timeseries()
.setTitle('KV Max Ops SSL')
.setUnit('ops')
.build(),
$data: new ShowfastQueryBuilder('kv', 'max_ops_ssl')
.setVisualizationType('timeseries')
.useTimelineData(true)
.buildQueryRunner()
}),
// KV 95th Percentile Latency Panel
new SceneFlexItem({
height: 400,
width: '50%',
minWidth: '45%',
body: PanelBuilders.timeseries()
.setTitle('KV 95th Percentile Latency')
.setUnit('ms')
.build(),
$data: new ShowfastQueryBuilder('kv', 'latency_95th')
.setVisualizationType('timeseries')
.useTimelineData(true)
.buildQueryRunner()
}),
// KV Metrics Table Panel
new SceneFlexItem({
height: 400,
width: '50%',
minWidth: '45%',
body: PanelBuilders.table()
.setTitle('Available KV Metrics')
.build(),
$data: new ShowfastQueryBuilder('kv', 'max_ops')
.setVisualizationType('table')
.useTimelineData(false) // Use metrics endpoint for table
.buildQueryRunner()
})
]
})
});
}