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

added-binary-arithmetic-operators-logical-operators-topk #723

Closed
wants to merge 1 commit into from
Closed
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
19 changes: 19 additions & 0 deletions prombench/manifests/prombench/benchmark/6_loadgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,25 @@ data:
- expr: histogram_quantile(0.99, sum by(path, le) (rate(codelab_api_request_duration_seconds_bucket{method="POST"}[5m])))
- expr: histogram_quantile(0.99, sum by(path, method, le) (rate(codelab_api_request_duration_seconds_bucket{method="POST"}[5m])))
- expr: histogram_quantile(0.99, sum by(instance, le) (rate(codelab_api_request_duration_seconds_bucket{method="POST"}[5m])))
- name: binary_arithmetic_operators
interval: 15s
type: instant
queries:
- expr: sum(node_memory_MemAvailable_bytes) / sum(node_memory_MemTotal_bytes)
Copy link
Member

Choose a reason for hiding this comment

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

I checked a running Prombench, and there are only 3 series like this; perhaps not great for a benchmark.

Copy link
Contributor

Choose a reason for hiding this comment

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

@bboreham Hi Sir, I hope you are doing well. First of all, sorry for the late reply. I'm also really glad that you liked my #743 PR.

So, now that I'm focusing on this, here are some of the suggested changes from my side. PTAL once so I can create a commit and merge it.

- name: binary_arithmetic_operators
  interval: 15s
  type: instant
  queries:
  - expr: sum(rate(codelab_api_requests_total[5m])) / count(codelab_api_requests_total)
  - expr: rate(codelab_api_request_duration_seconds_count[5m]) * 60
  - expr: codelab_api_request_duration_seconds_sum / codelab_api_request_duration_seconds_count

As suggested by you, I have made changes, PTAL.

- 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.

I couldn't find any of these in Prombench. Where would this metric come from?

Copy link
Contributor

Choose a reason for hiding this comment

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

Some more proposed changes:

- name: logical_operators
  interval: 15s
  type: instant
  queries:
  - expr: rate(codelab_api_requests_total{method="GET"}[5m]) and rate(codelab_api_requests_total{method="POST"}[5m])
  - expr: codelab_api_requests_total unless codelab_api_request_errors_total
  - expr: rate(codelab_api_requests_total[5m]) or rate(codelab_api_request_errors_total[5m])
 
- name: topk_example
  interval: 15s
  type: instant
  queries:
  - expr: topk(5, sum by(method, path) (rate(codelab_api_requests_total[5m])))

---
apiVersion: apps/v1
kind: Deployment
Expand Down