Created
January 25, 2022 21:36
-
-
Save lktslionel/a303514a7b1660844a4f40829b37a22e to your computer and use it in GitHub Desktop.
temp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export let errorRate = new Rate("errors"); | |
export default function() { | |
let res = http.get("https://httpbin.org/status/200,400") | |
let requestTimedout = check(res, {"exceeds timeout of 1500ms": (r) => r.timings.duration < 1500}); | |
let requestTimedout = !(checkRequestSucceeded) | |
if (requestTimedout) { | |
errorRate.add(1); | |
} | |
}; | |
SELECT count("value") FROM "errors" WHERE "value"=1 and $timeFilter GROUP BY time($__interval) fill(none) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment