Skip to content

Commit

Permalink
Merge branch 'cloud-bulldozer:master' into ingress
Browse files Browse the repository at this point in the history
  • Loading branch information
smanda99 authored Dec 5, 2023
2 parents 01bb129 + aadd6c1 commit 380884f
Show file tree
Hide file tree
Showing 10 changed files with 558 additions and 16 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Get dependencies
run: make deps
Expand All @@ -35,7 +35,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Compile dashboards
run: make build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install dependencies required for multi-arch builds
run: sudo apt-get update && sudo apt-get install qemu-user-static podman fuse-overlayfs
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
JSONNET := https://github.com/google/go-jsonnet/releases/download/v0.20.0/go-jsonnet_0.20.0_Linux_x86_64.tar.gz
JB = https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-linux-amd64
ARCH := $(shell arch)
OS_TYPE := $(shell uname)
JB_OS_TYPE := $(shell uname | tr '[:upper:]' '[:lower:]')
JSONNET := https://github.com/google/go-jsonnet/releases/download/v0.20.0/go-jsonnet_0.20.0_$(OS_TYPE)_$(ARCH).tar.gz
JB = https://github.com/jsonnet-bundler/jsonnet-bundler/releases/latest/download/jb-$(JB_OS_TYPE)-$(ARCH)
BINDIR = bin
TEMPLATESDIR = templates
OUTPUTDIR = rendered
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ mkdir -p rendered/General/
bin/jsonnet -J ./templates/vendor templates/General/ocp-performance-v2.jsonnet > rendered/General/ocp-performance-v2.json
Rendered the v2 dashboards with latest grafonnet library
```
All other operations remain same as before.
Rest all operations remain same as before.

In order to clean up the environment execute `make clean`.

Expand Down
249 changes: 249 additions & 0 deletions assets/k8s-netperf/panels.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,249 @@
local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet';

{
row: {
local row = g.panel.row,

base(title, repeat, gridPos):
row.new(title)
+ row.withRepeat(repeat)
+ row.gridPos.withX(gridPos.x)
+ row.gridPos.withY(gridPos.y)
+ row.gridPos.withH(gridPos.h)
+ row.gridPos.withW(gridPos.w),
},

table: {
local table = g.panel.table,
local options = table.options,

base(title, targets, gridPos):
table.new(title)
+ table.datasource.withType('elasticsearch')
+ table.datasource.withUid('$datasource')
+ table.panelOptions.withRepeat("profile")
+ table.panelOptions.withRepeatDirection("h")
+ table.standardOptions.color.withMode("thresholds")
+ table.queryOptions.withTargets(targets)
+ table.gridPos.withX(gridPos.x)
+ table.gridPos.withY(gridPos.y)
+ table.gridPos.withH(gridPos.h)
+ table.gridPos.withW(gridPos.w)
+ table.queryOptions.withTransformations([
{
"id": "organize",
"options": {
"excludeByName": {
"Average latency": true,
"ltcyMetric.keyword": true,
"tputMetric.keyword": true
},
"indexByName": {
"Average": 10,
"hostNetwork": 8,
"ltcyMetric.keyword": 7,
"messageSize": 3,
"metadata.clusterName.keyword": 1,
"metadata.platform.keyword": 5,
"metadata.workerNodesType.keyword": 9,
"profile.keyword": 2,
"service": 6,
"tputMetric.keyword": 4,
"uuid.keyword": 0
},
"renameByName": {
"Average": "Throughput",
"Average latency": "P99 latency",
"ltcyMetric.keyword": "",
"metadata.clusterName.keyword": "clusterName",
"metadata.platform.keyword": "Platform",
"metadata.workerNodesType.keyword": "workers",
"profile.keyword": "Profile",
"uuid.keyword": "uuid"
}
}
}
])
+ table.standardOptions.withOverrides([
{
"matcher": {
"id": "byName",
"options": "Average"
},
"properties": [
{
"id": "unit",
"value": "Mbits"
}
]
},
{
"matcher": {
"id": "byName",
"options": "messageSize"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
}
])
+ options.withCellHeight("sm")
+ options.withFooter({
"countRows": false,
"fields": "",
"reducer": [
"sum"
],
"show": false
})
+ options.withSortBy([
{
"desc": true,
"displayName": "ea7b29d7-8991-4752-a0d4-e26446d34915 TCP_STREAM 4096 Mb/s AWS"
}
]),

withLatencyOverrides(title, targets, gridPos):
self.base(title, targets, gridPos)
+ table.queryOptions.withTransformations([
{
"id": "organize",
"options": {
"excludeByName": {
"Average latency": true,
"ltcyMetric.keyword": true,
"tputMetric.keyword": true
},
"indexByName": {
"Average": 8,
"hostNetwork": 6,
"messageSize": 3,
"metadata.clusterName.keyword": 1,
"metadata.platform.keyword": 4,
"metadata.workerNodesType.keyword": 7,
"profile.keyword": 2,
"service": 5,
"uuid.keyword": 0
},
"renameByName": {
"Average": "P99 latency",
"Average latency": "P99 latency",
"ltcyMetric.keyword": "",
"metadata.clusterName.keyword": "clusterName",
"metadata.platform.keyword": "Platform",
"metadata.workerNodesType.keyword": "workers",
"profile.keyword": "Profile",
"uuid.keyword": "uuid"
}
}
}
])
+ table.standardOptions.withOverrides([
{
"matcher": {
"id": "byName",
"options": "Average"
},
"properties": [
{
"id": "unit",
"value": "µs"
}
]
},
{
"matcher": {
"id": "byName",
"options": "messageSize"
},
"properties": [
{
"id": "unit",
"value": "bytes"
}
]
}
]),
},

timeSeries: {
local timeSeries = g.panel.timeSeries,
local custom = timeSeries.fieldConfig.defaults.custom,
local options = timeSeries.options,

base(title, targets, gridPos):
timeSeries.new(title)
+ timeSeries.queryOptions.withTargets(targets)
+ timeSeries.panelOptions.withRepeat("messageSize")
+ timeSeries.panelOptions.withRepeatDirection("h")
+ timeSeries.datasource.withType('elasticsearch')
+ timeSeries.datasource.withUid('$datasource')
+ timeSeries.gridPos.withX(gridPos.x)
+ timeSeries.gridPos.withY(gridPos.y)
+ timeSeries.gridPos.withH(gridPos.h)
+ timeSeries.gridPos.withW(gridPos.w)
+ custom.withLineWidth(2)
+ custom.withGradientMode("hue")
+ custom.withShowPoints("always")
+ custom.withPointSize(10)
+ custom.withSpanNulls(true)
+ custom.withFillOpacity(0)
+ custom.withScaleDistribution({
"type": "log",
"log": 2
})
+ custom.withAxisCenteredZero(false)
+ custom.withHideFrom({
"tooltip": false,
"viz": false,
"legend": false
})
+ custom.withAxisGridShow(true)
+ custom.withLineStyle({
"fill": "solid"
})
+ options.tooltip.withMode('single')
+ options.tooltip.withSort('none')
+ options.legend.withShowLegend(true)
+ options.legend.withPlacement('bottom')
+ options.legend.withDisplayMode('table')
+ options.legend.withCalcs(['lastNotNull'])
+ timeSeries.standardOptions.withOverrides([
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "unit",
"value": "µs"
}
]
}
]),

withThroughputOverrides(title, targets, gridPos):
self.base(title, targets, gridPos)
+ options.legend.withSortBy("Last *")
+ options.legend.withPlacement('right')
+ options.legend.withSortDesc(false)
+ timeSeries.standardOptions.withOverrides([
{
"matcher": {
"id": "byFrameRefID",
"options": "A"
},
"properties": [
{
"id": "unit",
"value": "Mbits"
}
]
}
]),
},
}
Loading

0 comments on commit 380884f

Please sign in to comment.