feat: all phases!
Signed-off-by: Raito Bezarius <masterancpp@gmail.com>
This commit is contained in:
parent
c990d0e853
commit
2fea8de1ec
2 changed files with 121 additions and 0 deletions
76
dashboards/gerrit/fetch-clone/gerrit-phases.jsonnet
Normal file
76
dashboards/gerrit/fetch-clone/gerrit-phases.jsonnet
Normal file
|
@ -0,0 +1,76 @@
|
|||
local grafana = import '../../../vendor/grafonnet/grafana.libsonnet';
|
||||
local dashboard = grafana.dashboard;
|
||||
local template = grafana.template;
|
||||
local graphPanel = grafana.graphPanel;
|
||||
local prometheus = grafana.prometheus;
|
||||
|
||||
local defaults = import '../../globals/defaults.libsonnet';
|
||||
local gridPos = import '../../globals/grid_pos.libsonnet';
|
||||
local publishVariables = import '../../globals/publish.libsonnet';
|
||||
local variables = import '../globals/variables.libsonnet';
|
||||
|
||||
local phase_count_panel = import './panels/phase-count.libsonnet';
|
||||
local bytes_panel = import './panels/bytes.libsonnet';
|
||||
|
||||
dashboard.new(
|
||||
'Gerrit - Git Phases',
|
||||
tags=['gerrit'],
|
||||
schemaVersion=defaults.dashboards.schemaVersion,
|
||||
editable=defaults.dashboards.editable,
|
||||
time_from=defaults.dashboards.timeFrom,
|
||||
time_to=defaults.dashboards.timeTo,
|
||||
refresh=defaults.dashboards.refresh,
|
||||
graphTooltip='shared_tooltip',
|
||||
)
|
||||
.addTemplate(variables.instance)
|
||||
.addTemplate(variables.replica)
|
||||
|
||||
.addPanel(
|
||||
phase_count_panel.new('searching_for_reuse', 'CLONE'),
|
||||
gridPos=gridPos.new(0, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('searching_for_reuse', 'FETCH'),
|
||||
gridPos=gridPos.new(0, 1)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('counting', 'CLONE'),
|
||||
gridPos=gridPos.new(1, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('counting', 'FETCH'),
|
||||
gridPos=gridPos.new(1, 1)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('compressing', 'CLONE'),
|
||||
gridPos=gridPos.new(2, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('compressing', 'FETCH'),
|
||||
gridPos=gridPos.new(2, 1)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('negotiating', 'CLONE'),
|
||||
gridPos=gridPos.new(3, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('negotiating', 'FETCH'),
|
||||
gridPos=gridPos.new(3, 1)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('searching_for_sizes', 'CLONE'),
|
||||
gridPos=gridPos.new(4, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('searching_for_sizes', 'FETCH'),
|
||||
gridPos=gridPos.new(4, 1)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('writing', 'CLONE'),
|
||||
gridPos=gridPos.new(5, 0)
|
||||
)
|
||||
.addPanel(
|
||||
phase_count_panel.new('writing', 'FETCH'),
|
||||
gridPos=gridPos.new(5, 1)
|
||||
)
|
||||
+ if std.extVar('publish') then publishVariables else {}
|
45
dashboards/gerrit/fetch-clone/panels/phase-count.libsonnet
Normal file
45
dashboards/gerrit/fetch-clone/panels/phase-count.libsonnet
Normal file
|
@ -0,0 +1,45 @@
|
|||
local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
|
||||
local prometheus = grafana.prometheus;
|
||||
|
||||
local lineGraph = import '../../../globals/line-graph.libsonnet';
|
||||
local yAxis = import '../../../globals/yaxis.libsonnet';
|
||||
|
||||
{
|
||||
new(phase, type):: lineGraph.new(
|
||||
title=std.format('Time spent in phase %s %s', [phase, type]),
|
||||
yAxis1=yAxis.new(
|
||||
format='s',
|
||||
logBase=10,
|
||||
)
|
||||
)
|
||||
.addTarget(
|
||||
prometheus.target(
|
||||
std.format('git_upload_pack_phase_%s_%s{instance="$instance",replica="$replica"}', [phase, type]),
|
||||
legendFormat='quantile: {{quantile}}',
|
||||
)
|
||||
)
|
||||
.addSeriesOverride(
|
||||
{
|
||||
alias: 'quantile: 0.99',
|
||||
hiddenSeries: true,
|
||||
}
|
||||
)
|
||||
.addSeriesOverride(
|
||||
{
|
||||
alias: 'quantile: 0.98',
|
||||
hiddenSeries: true,
|
||||
}
|
||||
)
|
||||
.addSeriesOverride(
|
||||
{
|
||||
alias: 'quantile: 0.95',
|
||||
hiddenSeries: true,
|
||||
}
|
||||
)
|
||||
.addSeriesOverride(
|
||||
{
|
||||
alias: 'quantile: 0.75',
|
||||
hiddenSeries: true,
|
||||
}
|
||||
)
|
||||
}
|
Loading…
Reference in a new issue