Skip to content

Commit

Permalink
Adapt metadata queries to lastest kube-burner changes
Browse files Browse the repository at this point in the history
Signed-off-by: Raul Sevilla <[email protected]>

Use jobSummary to get version

Signed-off-by: Raul Sevilla <[email protected]>

Reduce result size to report cluster's metadata

Signed-off-by: Raul Sevilla <[email protected]>

Formatted changes

Signed-off-by: Raul Sevilla <[email protected]>
  • Loading branch information
rsevilla87 committed Sep 3, 2024
1 parent d0644af commit e24e8e6
Show file tree
Hide file tree
Showing 8 changed files with 309 additions and 298 deletions.
210 changes: 100 additions & 110 deletions assets/kube-burner-report-mode/panels.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
+ table.gridPos.withH(gridPos.h)
+ table.gridPos.withW(gridPos.w),

withPagination(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ options.footer.TableFooterOptions.withEnablePagination(true),

withBenchmarkOverview(title, unit, targets, gridPos):
withPlatformOverview(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ table.queryOptions.withTransformations([
{
Expand All @@ -30,113 +26,125 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
_id: true,
_index: true,
_type: true,
benchmark: false,
clustertype: true,
elapsedTime: true,
endDate: true,
end_date: true,
endTimestamp: true,
highlight: true,
'jobConfig.burst': true,
'jobConfig.churnDelay': true,
'jobConfig.churnDeletionStrategy': true,
'jobConfig.churnDuration': true,
'jobConfig.churnPercent': true,
'jobConfig.cleanup': true,
'jobConfig.errorOnVerify': true,
'jobConfig.iterationsPerNamespace': true,
'jobConfig.jobIterationDelay': true,
'jobConfig.jobIterations': false,
'jobConfig.jobIterations': true,
'jobConfig.jobPause': true,
'jobConfig.jobType': true,
'jobConfig.maxWaitTimeout': true,
'jobConfig.name': true,
'jobConfig.namespace': true,
'jobConfig.namespaced': true,
'jobConfig.namespacedIterations': false,
'jobConfig.namespacedIterations': true,
'jobConfig.objects': true,
'jobConfig.preLoadImages': true,
'jobConfig.preLoadPeriod': true,
'jobConfig.qps': true,
'jobConfig.verifyObjects': true,
'jobConfig.waitFor': true,
'jobConfig.waitForDeletion': true,
'jobConfig.waitWhenFinished': true,
k8sVersion: true,
metricName: true,
ocp_version: true,
platform: false,
sdn_type: false,
ocpMajorVersion: true,
ocpVersion: true,
sort: true,
timestamp: true,
total_nodes: false,
uuid: false,
version: true,
workload: true,
workload_nodes_count: true,
workload_nodes_type: true,
churnStartTimestamp: true,
churnEndTimestamp: true,
publish: true,
ipsecMode: true,
},
indexByName: {
timestamp: 0,
_id: 1,
_index: 2,
_type: 3,
benchmark: 5,
clusterName: 8,
endDate: 9,
highlight: 6,
infraNodesCount: 20,
infraNodesType: 21,
k8sVersion: 10,
masterNodesType: 16,
metricName: 13,
ocpVersion: 11,
passed: 15,
platform: 12,
sdnType: 14,
sort: 7,
timestamp: 0,
totalNodes: 17,
uuid: 4,
workerNodesCount: 18,
workerNodesType: 19,
highlight: 5,
sort: 6,
clusterName: 7,
k8sVersion: 8,
ocpVersion: 9,
platform: 10,
region: 11,
metricName: 12,
sdnType: 13,
passed: 14,
masterNodesType: 15,
totalNodes: 16,
workerNodesCount: 17,
churnEndTimestamp: 18,
churnStartTimestamp: 19,
clusterType: 20,
controlPlaneArch: 21,
elapsedTime: 22,
endTimestamp: 23,
ipsecMode: 24,
'jobConfig.burst': 25,
'jobConfig.churnDelay': 26,
'jobConfig.churnDeletionStrategy': 27,
'jobConfig.churnDuration': 28,
'jobConfig.churnPercent': 29,
'jobConfig.cleanup': 30,
'jobConfig.errorOnVerify': 31,
'jobConfig.iterationsPerNamespace': 32,
'jobConfig.jobIterations': 33,
'jobConfig.jobType': 34,
'jobConfig.maxWaitTimeout': 35,
'jobConfig.name': 36,
'jobConfig.namespace': 37,
'jobConfig.namespacedIterations': 38,
'jobConfig.preLoadImages': 39,
'jobConfig.preLoadPeriod': 40,
'jobConfig.qps': 41,
'jobConfig.verifyObjects': 42,
'jobConfig.waitForDeletion': 43,
'jobConfig.waitWhenFinished': 44,
masterNodesCount: 45,
ocpMajorVersion: 46,
publish: 47,
version: 48,
workerArch: 49,
},
renameByName: {
_index: '',
_type: '',
clusterName: 'Cluster',
elapsedTime: 'Elapsed time',
elapsedTime: '',
endDate: '',
infraNodesCount: 'infra count',
infraNodesType: 'infra type',
infra_nodes_count: 'Infra nodes',
infra_nodes_type: 'Infra flavor',
'jobConfig.burst': 'Burst',
'jobConfig.cleanup': '',
'jobConfig.errorOnVerify': 'errorOnVerify',
'jobConfig.jobIterationDelay': 'jobIterationDelay',
'jobConfig.jobIterations': 'Iterations',
'jobConfig.jobPause': 'jobPause',
'jobConfig.jobType': 'Job Type',
'jobConfig.maxWaitTimeout': 'maxWaitTImeout',
'jobConfig.name': 'Name',
'jobConfig.namespace': 'namespacePrefix',
'jobConfig.namespaced': '',
'jobConfig.namespacedIterations': 'Namespaced iterations',
'jobConfig.objects': '',
'jobConfig.podWait': 'podWait',
'jobConfig.preLoadImages': 'Preload Images',
'jobConfig.preLoadPeriod': '',
'jobConfig.qps': 'QPS',
'jobConfig.verifyObjects': '',
k8sVersion: 'k8s version',
k8s_version: 'k8s version',
masterNodesType: 'master type',
master_nodes_count: 'Master nodes',
master_nodes_type: 'Masters flavor',
metricName: '',
ocpVersion: 'OCP version',
passed: 'Passed',
platform: 'Platform',
result: 'Result',
sdnType: 'SDN',
sdn_type: 'SDN',
timestamp: '',
totalNodes: 'total nodes',
total_nodes: 'Total nodes',
uuid: 'UUID',
version: '',
workerNodesCount: 'worker count',
workerNodesType: 'worker type',
worker_nodes_count: 'Worker nodes',
worker_nodes_type: 'Workers flavor',
workload: '',
workload_nodes_count: 'Workload nodes',
workload_nodes_type: 'Workload flavor',
region: 'Region',
},
},
},
Expand Down Expand Up @@ -176,7 +184,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
},
]),

withGarbageCollection(title, unit, targets, gridPos):
withJobSummary(title, unit, targets, gridPos):
self.base(title, unit, targets, gridPos)
+ table.queryOptions.withTransformations([
{
Expand All @@ -186,6 +194,7 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
_id: true,
_index: true,
_type: true,
endTimestamp: true,
highlight: true,
'jobConfig.churnDelay': true,
'jobConfig.churnDuration': true,
Expand All @@ -194,11 +203,9 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
'jobConfig.errorOnVerify': true,
'jobConfig.iterationsPerNamespace': true,
'jobConfig.jobIterationDelay': true,
'jobConfig.jobIterations': false,
'jobConfig.jobPause': true,
'jobConfig.jobType': true,
'jobConfig.maxWaitTimeout': true,
'jobConfig.name': false,
'jobConfig.namespace': true,
'jobConfig.namespaceLabels.pod-security.kubernetes.io/audit': true,
'jobConfig.namespaceLabels.pod-security.kubernetes.io/enforce': true,
Expand All @@ -214,17 +221,27 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
'jobConfig.waitFor': true,
'jobConfig.waitForDeletion': true,
'jobConfig.waitWhenFinished': true,
'metadata.cloud-bulldozer': true,
'metadata.k8sVersion': true,
'metadata.ocpMajorVersion': true,
'metadata.ocpVersion': true,
'metadata.platform': true,
'metadata.sdnType': true,
'metadata.totalNodes': true,
k8sVersion: true,
metricName: true,
ocpMajorVersion: true,
ocpVersion: true,
platform: true,
sdnType: true,
sort: true,
timestamp: false,
uuid: false,
totalNodes: true,
churnStartTimestamp: true,
churnEndTimestamp: true,
clusterName: true,
clusterType: true,
controlPlaneArch: true,
ipsecMode: true,
masterNodesCount: true,
masterNodesType: true,
publish: true,
region: true,
workerArch: true,
workerNodesCount: true,
passed: true,
},
indexByName: {
_id: 2,
Expand All @@ -250,23 +267,22 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
'jobConfig.verifyObjects': 15,
'jobConfig.waitForDeletion': 16,
'jobConfig.waitWhenFinished': 17,
'metadata.k8sVersion': 26,
'metadata.ocpMajorVersion': 27,
'metadata.ocpVersion': 28,
'metadata.platform': 29,
'metadata.sdnType': 30,
'metadata.totalNodes': 31,
k8sVersion: 26,
metricName: 18,
ocpMajorVersion: 27,
ocpVersion: 28,
platform: 29,
sdnType: 30,
sort: 32,
timestamp: 1,
totalNodes: 31,
uuid: 0,
version: 33,
},
renameByName: {
_type: '',
elapsedTime: 'Elapsed time',
elapsedTimeNs: 'Elapsed Time',
endTimestamp: '',
endTimestamp: 'End date',
highlight: '',
'jobConfig.burst': 'Burst',
'jobConfig.churn': 'Churn',
Expand All @@ -291,8 +307,6 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
'jobConfig.preLoadPeriod': '',
'jobConfig.qps': 'QPS',
'jobConfig.verifyObjects': '',
'metadata.ocpMajorVersion': 'Major version',
'metadata.platform': 'Platform',
metricName: '',
timestamp: 'Date',
uuid: 'UUID',
Expand All @@ -307,35 +321,13 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
id: 'byName',
options: 'Elapsed time',
},
properties: [
{
id: 'unit',
value: 's',
},
],
},
{
matcher: {
id: 'byName',
options: 'Elapsed Time',
},
properties: [
{
id: 'unit',
value: 'ns',
},
],
},
])
+ table.standardOptions.thresholds.withSteps([
{
color: 'green',
value: null,
},
{
color: 'red',
value: 80,
},
]),
},

Expand Down Expand Up @@ -528,6 +520,4 @@ local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonn
+ options.legend.withSortDesc(true),

},


}
6 changes: 3 additions & 3 deletions assets/kube-burner-report-mode/queries.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ local elasticsearch = g.query.elasticsearch;

{

benchmarkOveriew: {
platformOverview: {
query():
elasticsearch.withAlias('')
+ elasticsearch.withBucketAggs([])
+ elasticsearch.withMetrics([
elasticsearch.metrics.MetricAggregationWithSettings.RawData.settings.withSize('500')
+ elasticsearch.metrics.MetricAggregationWithSettings.RawData.withType('raw_data'),
])
+ elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: clusterMetadata')
+ elasticsearch.withQuery('uuid.keyword: $uuid AND metricName.keyword: jobSummary')
+ elasticsearch.withTimeField('timestamp'),
},

garbageCollection: {
jobSummary: {
query():
elasticsearch.withAlias('')
+ elasticsearch.withBucketAggs([])
Expand Down
Loading

0 comments on commit e24e8e6

Please sign in to comment.