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

Replace load-generator with Go implementation #743

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

HarshitNagpal2901
Copy link

Replace python load-generator with a Go implementation.
Add additional PromQL tests.
Fixes #688
Fixes #705

tools/load-generator/main.go Outdated Show resolved Hide resolved
tools/load-generator/main.go Outdated Show resolved Hide resolved
tools/load-generator/main.go Outdated Show resolved Hide resolved
@HarshitNagpal2901
Copy link
Author

@SuperQ sir, PTAL

tools/load-generator/main.go Outdated Show resolved Hide resolved
Co-authored-by: Ben Kochie <[email protected]>
Signed-off-by: Harshit Nagpal <[email protected]>
@HarshitNagpal2901
Copy link
Author

@SuperQ Sir, can u pls approve?

Copy link
Member

@bboreham bboreham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty good - crashed on first attempt but after a simple fix it seems to be running fine.

Comment on lines +51 to +69
- name: binary_arithmetic_operators
interval: 15s
type: instant
queries:
- expr: sum(node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes)
- expr: rate(node_network_transmit_bytes_total[5m]) * 8
- expr: node_filesystem_avail_bytes / node_filesystem_size_bytes
- name: logical_operators
interval: 15s
type: instant
queries:
- expr: rate(node_cpu_seconds_total{mode="system"}[5m]) and rate(node_cpu_seconds_total{mode="user"}[5m])
- expr: node_filesystem_avail_bytes unless node_filesystem_size_bytes
- expr: rate(node_network_receive_bytes_total[5m]) or rate(node_network_transmit_bytes_total[5m])
- name: topk_example
interval: 15s
type: instant
queries:
- expr: topk(5, rate(http_requests_total[5m]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full marks for including it in the description, but this should be a separate PR.
Indeed it already is - #723.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bboreham Hi Sir, I am the same person who has created that #723 PR. I was not able to do DCO sign off for some weird reason, so i created a Fresh PR, from my secondary account, as i told that, my university exams are going on till september end, so as soon as it will end, i will look up to both the PRs.
Hope you understand.❤️❤️

tools/load-generator/Dockerfile Show resolved Hide resolved
}

func durationSeconds(s string) time.Duration {
num := s[:len(s)-1]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Crashes when s is empty.

@bboreham
Copy link
Member

I didn't want to push a commit to your main branch so created a new PR with my fix at #748.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PromBench Idea: exercise more parts of PromQL Rewrite load-generator in Go
4 participants