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

Emit the value of the threshold-metric at the end of the test. #1956

Open
sniku opened this issue Apr 8, 2021 · 2 comments
Open

Emit the value of the threshold-metric at the end of the test. #1956

sniku opened this issue Apr 8, 2021 · 2 comments

Comments

@sniku
Copy link
Collaborator

sniku commented Apr 8, 2021

At the end of the k6 run -o cloud test, k6 should send both the result of the threshold and the value of the metric the threshold is using.

Environment

  • k6 version: 0.31.1
  • k6 run -o cloud test.

Actual Behavior

At the end of the test, k6 sends the result of the threshold (true or false) but does not send the value of the metric itself. k6 currently sends a structure similar to this

{
  "result_status": 0,
  "run_status": 3,
  "thresholds": {
    "check_failure_rate": {
      "rate<0.01": false,
      "rate<=0.05": false
    },
    "http_req_duration{staticAsset:yes}": {
      "p(99)<250": false
    }
  }
}

Expected Behavior

k6 should send both the result of the threshold and the value of the metric the threshold is using. The above structure should look similar to this

{
   "result_status":0,
   "run_status":3,
   "thresholds":{
      "check_failure_rate":{
         "rate<0.01":{
            "result":false,
            "value":0.01
         },
         "rate<=0.05":{
            "result":false,
            "value":0.01
         }
      },
      "http_req_duration{staticAsset:yes}":{
         "p(99)<250":{
            "result":false,
            "value":219.54
         }
      }
   }
}

Steps to Reproduce the Problem

  1. Run a k6 run -o cloud script.js test
  2. View the Thresholds tab. The value is missing.
    image

Dependencies

This issue is most likely blocked by #1443 and #961 because k6 currently doesn't know the threshold metric value since the threshold is evaluated in its own js runtime.
#1832 would help but is not a hard blocker (?).

@mkerollos
Copy link

Are there any known workarounds to this issue?

@na--
Copy link
Member

na-- commented Jan 6, 2023

No, sorry 😞 I see we've basically cleared all of the blockers for this issue though! So, no promises, but there is a good chance that we will prioritize fixing it in the near future 🤞

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

No branches or pull requests

5 participants