Skip to content

Instantly share code, notes, and snippets.

@lktslionel
Created January 25, 2022 21:36
Show Gist options
  • Save lktslionel/a303514a7b1660844a4f40829b37a22e to your computer and use it in GitHub Desktop.
Save lktslionel/a303514a7b1660844a4f40829b37a22e to your computer and use it in GitHub Desktop.
temp
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