Extract yAxis object

Change-Id: I98c0708e521c0122beb53869242a3a1df8db3f3d
This commit is contained in:
Thomas Draebing 2020-09-10 10:31:38 +02:00
parent 82d9ead576
commit 12aba901e4
25 changed files with 104 additions and 50 deletions

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='ACCOUNT cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('accounts'))

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='CHANGE cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('change_kind'))

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='CONFLICT cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('conflicts'))

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='DIFF cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('diff'))

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='MISC cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('web_sessions'))

View file

@ -1,10 +1,10 @@
local target = import './cache_target.libsonnet';
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='PROJECT cache misses',
labelY1='Cache Misses',
formatY1='percent',
yAxis1=yAxis.cache_misses,
fill=0,
)
.addTarget(target.new('project_list'))

View file

@ -2,10 +2,11 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='CPU',
labelY1='CPU cores',
yAxis1=yAxis.new(label='CPU cores'),
)
.addTarget(
prometheus.target(

View file

@ -3,10 +3,11 @@ local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='Java open file descriptors',
labelY1='Open File Descriptors',
yAxis1=yAxis.new(label='Open File Descriptors'),
stack=true,
)
.addTarget(

View file

@ -2,11 +2,14 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local barGraph = import '../../../globals/bar-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
barGraph.new(
title='Java - % of time spent in GC',
formatY1='percentunit',
labelY1='GC Time',
yAxis1=yAxis.new(
label='Open File Descriptors',
format='percentunit',
),
)
.addTarget(
prometheus.target(

View file

@ -3,13 +3,18 @@ local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='JGit block cache',
formatY1='percentunit',
labelY1='miss ratio',
formatY2='percentunit',
labelY2='eviction ratio',
yAxis1=yAxis.new(
label='miss ratio',
format='percentunit',
),
yAxis2=yAxis.new(
label='eviction ratio',
format='percentunit',
),
)
.addTarget(
prometheus.target(

View file

@ -3,11 +3,14 @@ local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='Memory',
formatY1='decbytes',
labelY1='Memory Consumption',
yAxis1=yAxis.new(
label='Memory Consumption',
format='decbytes',
),
)
.addTarget(
prometheus.target(

View file

@ -3,10 +3,11 @@ local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='System load',
labelY1='System load',
yAxis1=yAxis.new(label='System load'),
)
.addTarget(
prometheus.target(

View file

@ -3,10 +3,11 @@ local graphPanel = grafana.graphPanel;
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='Threads',
labelY1='Live Threads',
yAxis1=yAxis.new(label='Live Threads'),
)
.addTarget(
prometheus.target(

View file

@ -2,12 +2,13 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local HTTP_TARGET = 'http';
lineGraph.new(
title='HTTP queue',
labelY1='Tasks',
yAxis1=yAxis.new(label='Tasks'),
)
.addTarget(
prometheus.target(

View file

@ -2,6 +2,7 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local ACTIVE_THREADS_TARGET = 'active threads';
local RESERVED_THREADS_TARGET = 'reserved threads';
@ -10,7 +11,7 @@ local POOL_SIZE_TARGET = 'pool size';
lineGraph.new(
title='HTTP threads',
labelY1='Threads',
yAxis1=yAxis.new(label='Threads'),
)
.addTarget(
prometheus.target(

View file

@ -2,13 +2,14 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local BATCH_TARGET = 'batch';
local INTERACTIVE_TARGET = 'interactive';
lineGraph.new(
title='INDEX queue',
labelY1='Tasks',
yAxis1=yAxis.new(label='Tasks'),
)
.addTarget(
prometheus.target(

View file

@ -2,6 +2,7 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local BATCH_THREADS_TARGET = 'batch threads';
local BATCH_POOL_SIZE_TARGET = 'batch pool size';
@ -10,7 +11,7 @@ local INTERACTIVE_POOL_SIZE_TARGET = 'interactive pool size';
lineGraph.new(
title='INDEX threads',
labelY1='Threads',
yAxis1=yAxis.new(label='Threads'),
)
.addTarget(
prometheus.target(

View file

@ -2,6 +2,7 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local STREAM_TARGET = 'stream threads';
local EMAIL_TARGET = 'email threads';
@ -9,7 +10,7 @@ local RECEIVE_COMMIT_TARGET = 'receive-commit threads';
lineGraph.new(
title='MISC queues',
labelY1='Tasks',
yAxis1=yAxis.new(label='Tasks'),
)
.addTarget(
prometheus.target(

View file

@ -2,6 +2,7 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local STREAM_TARGET = 'stream threads';
local STREAM_POOL_SIZE_TARGET = 'stream pool size';
@ -12,7 +13,7 @@ local RECEIVE_COMMIT_POOL_SIZE_TARGET = 'receive-commit pool size';
lineGraph.new(
title='MISC threads',
labelY1='Threads',
yAxis1=yAxis.new(label='Threads'),
)
.addTarget(
prometheus.target(

View file

@ -2,11 +2,14 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
lineGraph.new(
title='REST API request rate',
labelY1='Requests/Second',
formatY1='reqps',
yAxis1=yAxis.new(
label='Threads',
format='reqps',
),
)
.addTarget(
prometheus.target(

View file

@ -2,13 +2,14 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local BATCH_TARGET = 'batch';
local INTERACTIVE_TARGET = 'interactive';
lineGraph.new(
title='SSH queue',
labelY1='Tasks',
yAxis1=yAxis.new(label='Tasks'),
)
.addTarget(
prometheus.target(

View file

@ -2,6 +2,7 @@ local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet';
local prometheus = grafana.prometheus;
local lineGraph = import '../../../globals/line-graph.libsonnet';
local yAxis = import '../../../globals/yaxis.libsonnet';
local BATCH_THREADS_TARGET = 'batch threads';
local BATCH_POOL_SIZE_TARGET = 'batch pool size';
@ -10,7 +11,7 @@ local INTERACTIVE_POOL_SIZE_TARGET = 'interactive pool size';
lineGraph.new(
title='SSH threads',
labelY1='Threads',
yAxis1=yAxis.new(label='Threads'),
)
.addTarget(
prometheus.target(

View file

@ -2,21 +2,26 @@ local grafana = import '../../vendor/grafonnet/grafana.libsonnet';
local graphPanel = grafana.graphPanel;
local defaults = import './defaults.libsonnet';
local yAxis = import './yaxis.libsonnet';
{
new(
title,
labelY1,
labelY2='',
formatY1='short',
formatY2='short',
yAxis1,
yAxis2=yAxis.new(),
min=null,
max=null,
stack=false,
):: graphPanel.new(
title=title,
labelY1=labelY1,
labelY2=labelY2,
formatY1=formatY1,
formatY2=formatY2,
labelY1=yAxis1.label,
formatY1=yAxis1.format,
logBase1Y=yAxis1.logBase,
labelY2=yAxis2.label,
formatY2=yAxis2.format,
logBase2Y=yAxis2.logBase,
min=min,
max=max,
stack=stack,
datasource=defaults.datasource,
fill=1,

View file

@ -2,22 +2,27 @@ local grafana = import '../../vendor/grafonnet/grafana.libsonnet';
local graphPanel = grafana.graphPanel;
local defaults = import './defaults.libsonnet';
local yAxis = import './yaxis.libsonnet';
{
new(
title,
labelY1,
labelY2='',
formatY1='short',
formatY2='short',
yAxis1,
yAxis2=yAxis.new(),
min=null,
max=null,
stack=false,
fill=1,
):: graphPanel.new(
title=title,
labelY1=labelY1,
labelY2=labelY2,
formatY1=formatY1,
formatY2=formatY2,
labelY1=yAxis1.label,
formatY1=yAxis1.format,
logBase1Y=yAxis1.logBase,
labelY2=yAxis2.label,
formatY2=yAxis2.format,
logBase2Y=yAxis2.logBase,
min=min,
max=max,
stack=stack,
datasource=defaults.datasource,
fill=fill,

View file

@ -0,0 +1,18 @@
{
new(show=true,
format='short',
label='',
logBase=1,):: {
format: format,
label: label,
logBase: logBase,
},
latency: self.new(
label='Latency',
format='s',
),
cache_misses: self.new(
label='Cache Misses',
format='percent',
),
}