Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[O11y][System] Rally benchmark system.cpu #9294

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions packages/system/_dev/benchmark/rally/cpu-benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
description: Benchmark 20000 system.cpu events ingested
data_stream:
name: cpu
corpora:
generator:
total_events: 20000
template:
type: gotext
path: ./cpu-benchmark/template.ndjson
config:
path: ./cpu-benchmark/config.yml
fields:
path: ./cpu-benchmark/fields.yml
99 changes: 99 additions & 0 deletions packages/system/_dev/benchmark/rally/cpu-benchmark/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
fields:
- name: timestamp
period: 60m
- name: event_duration
range:
min: 0
max: 100000
- name: user_pct
range:
min: 0
max: 100
- name: nice_pct
range:
min: 0
max: 100
- name: idle_pct
range:
min: 0
max: 100
- name: iowait_pct
range:
min: 0
max: 100
- name: irq_pct
range:
min: 0
max: 100
- name: softirq_pct
range:
min: 0
max: 100
- name: steal_pct
range:
min: 0
max: 100
- name: total_pct
range:
min: 0
max: 100
- name: user_norm_pct
range:
min: 0
max: 100
- name: norm_pct
range:
min: 0
max: 100
- name: nice_norm_pct
range:
min: 0
max: 100
- name: idle_norm_pct
range:
min: 0
max: 100
- name: iowait_norm_pct
range:
min: 0
max: 100
- name: irq_norm_pct
range:
min: 0
max: 100
- name: softirq_norm_pct
range:
min: 0
max: 100
- name: system_pct
range:
min: 0
max: 100
- name: steal_norm_pct
range:
min: 0
max: 100
- name: total_norm_pct
range:
min: 0
max: 100
- name: user_ticks
counter: true
- name: system_ticks
counter: true
- name: nice_ticks
counter: true
- name: idle_ticks
counter: true
- name: iowait_ticks
counter: true
- name: irq_ticks
counter: true
- name: softirq_ticks
counter: true
- name: steal_ticks
counter: true
- name: cpu_pct
range:
min: 0
max: 1
60 changes: 60 additions & 0 deletions packages/system/_dev/benchmark/rally/cpu-benchmark/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
- name: timestamp
type: date
- name: event_duration
type: long
- name: user_pct
type: float
- name: nice_pct
type: float
- name: idle_pct
type: float
- name: iowait_pct
type: float
- name: irq_pct
type: float
- name: softirq_pct
type: float
- name: steal_pct
type: float
- name: total_pct
type: float
- name: user_norm_pct
type: float
- name: norm_pct
type: float
- name: nice_norm_pct
type: float
- name: idle_norm_pct
type: float
- name: iowait_norm_pct
type: float
- name: irq_norm_pct
type: float
- name: system_pct
type: float
- name: softirq_norm_pct
type: float
- name: steal_norm_pct
type: float
- name: total_norm_pct
type: float
- name: user_ticks
type: long
- name: system_ticks
type: long
- name: nice_ticks
type: long
- name: idle_ticks
type: long
- name: iowait_ticks
type: long
- name: irq_ticks
type: long
- name: softirq_ticks
type: long
- name: steal_ticks
type: long
- name: total_ticks
type: long
- name: cpu_pct
type: float
154 changes: 154 additions & 0 deletions packages/system/_dev/benchmark/rally/cpu-benchmark/template.ndjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{{- $event_duration := generate "event_duration" }}
{{- $timestamp := generate "timestamp" }}
{{- $user_pct := generate "user_pct" }}
{{- $nice_pct := generate "nice_pct" }}
{{- $idle_pct := generate "idle_pct" }}
{{- $iowait_pct := generate "iowait_pct" }}
{{- $irq_pct := generate "irq_pct" }}
{{- $softirq_pct := generate "softirq_pct" }}
{{- $steal_pct := generate "steal_pct" }}
{{- $total_pct := generate "total_pct" }}
{{- $user_norm_pct := generate "user_norm_pct" }}
{{- $norm_pct := generate "norm_pct" }}
{{- $nice_norm_pct := generate "nice_norm_pct" }}
{{- $idle_norm_pct := generate "idle_norm_pct" }}
{{- $iowait_norm_pct := generate "iowait_norm_pct" }}
{{- $irq_norm_pct := generate "irq_norm_pct" }}
{{- $system_pct := generate "system_pct" }}
{{- $softirq_norm_pct := generate "softirq_norm_pct" }}
{{- $steal_norm_pct := generate "steal_norm_pct" }}
{{- $total_norm_pct := generate "total_norm_pct" }}
{{- $user_ticks := generate "user_ticks" }}
{{- $nice_ticks := generate "nice_ticks" }}
{{- $idle_ticks := generate "idle_ticks" }}
{{- $iowait_ticks := generate "iowait_ticks" }}
{{- $irq_ticks := generate "irq_ticks" }}
{{- $softirq_ticks := generate "softirq_ticks" }}
{{- $steal_ticks := generate "steal_ticks" }}
{{- $system_ticks := generate "system_ticks" }}
{{- $total_ticks := generate "total_ticks" }}
{{- $cpu_pct := generate "cpu_pct" }}
{
"@timestamp": "{{ $timestamp.Format "2006-01-02T15:04:05.000Z07:00" }}",
"agent": {
"ephemeral_id": "22ed892c-43bd-408a-9121-65e2f5b6a56e",
"id": "de42127b-4db8-4471-824e-a7b14f478663",
"name": "system-scale-123456",
"type": "metricbeat",
"version": "8.12.1"
},
"data_stream": {
"dataset": "system.cpu",
"namespace": "ep",
"type": "metrics"
},
"ecs": {
"version": "8.0.0"
},
"elastic_agent": {
"id": "de42127b-4db8-4471-824e-a7b14f478663",
"snapshot": false,
"version": "8.12.0"
},
"event": {
"agent_id_status": "verified",
"duration": {{ $event_duration }},
"module": "system"
},
"host": {
"architecture": "x86_64",
"containerized": true,
"cpu": {
"pct": {{ $cpu_pct }}
},
"hostname": "docker-fleet-agent",
"id": "829324aac17946dcace17006fa82a2d2",
"ip": "192.168.254.7",
"mac": "02-42-C0-A8-FE-07",
"name": "docker-fleet-agent",
"os": {
"codename": "focal",
"family": "debian",
"kernel": "3.10.0-1160.105.1.el7.x86_64",
"name": "Ubuntu",
"platform": "ubuntu",
"type": "linux",
"version": "20.04.6 LTS (Focal Fossa)"
}
},
"metricset": {
"name": "cpu",
"period": 10000
},
"service": {
"type": "system"
},
"system": {
"cpu": {
"cores": 12,
"idle": {
"norm": {
"pct": {{ divf $idle_norm_pct 100 }}
},
"pct": {{ $idle_pct }},
"ticks": {{ $idle_ticks }}
},
"iowait": {
"norm": {
"pct": {{ divf $iowait_norm_pct 100 }}
},
"pct": {{ $iowait_pct }},
"ticks": {{ $iowait_ticks }}
},
"irq": {
"norm": {
"pct": {{ divf $irq_norm_pct 100 }}
},
"pct": {{ $irq_pct }},
"ticks": {{ $irq_ticks }}
},
"nice": {
"norm": {
"pct": {{ divf $nice_norm_pct 100 }}
},
"pct": {{ $nice_pct }},
"ticks": {{ $nice_ticks }}
},
"softirq": {
"norm": {
"pct": {{ divf $softirq_norm_pct 100 }}
},
"pct": {{ $softirq_pct }},
"ticks": {{ $softirq_ticks }}
},
"steal": {
"norm": {
"pct": {{ divf $steal_norm_pct 100 }}
},
"pct": {{ $steal_pct }},
"ticks": {{ $steal_ticks }}
},
"system": {
"norm": {
"pct": {{ divf $norm_pct 100 }}
},
"pct": {{ $system_pct }},
"ticks": {{ $system_ticks }}
},
"total": {
"norm": {
"pct": {{ divf $total_norm_pct 100 }}
},
"pct": {{ $total_pct }},
"ticks": {{ $total_ticks }}
},
"user": {
"norm": {
"pct": {{ divf $user_norm_pct 100 }}
},
"pct": {{ $user_pct }},
"ticks": {{ $user_ticks }}
}
}
}
}