-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Documentation update - README.md and metrics API reference #57
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
Conversation
|
||
##Per-request metrics## | ||
```es6 | ||
var res = http.get(“http://httpbin.org” (http://httpbin.xn--org-9o0a/)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what the URL in parentheses refers to?
Also: use straight quotes or it messes up the formatting!
var res = http.get(“http://httpbin.org”);
console.log(“Response time was “ + String(res.timings.duration) + “ ms”);
vs
var res = http.get("http://httpbin.org");
console.log("Response time was " + String(res.timings.duration) + " ms");
You could also use ES6 template literals if you want:
var res = http.get("http://httpbin.org");
console.log(`Response time was ${res.timings.duration} ms`);
@@ -0,0 +1,151 @@ | |||
#k6 Metrics Management# | |||
|
|||
This section covers the important aspect of metrics management in k6 - built-in implicit structures and custom explicit features. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we make this a bit less dry and buzzwordy? Right now it reads like something straight out of an IBM or Oracle manual. (Yes, I have read both of those.)
Compare to the tone of the README and getting started guide. I don't mind rephrasing it myself if you think that'd be easier.
@@ -0,0 +1,151 @@ | |||
#k6 Metrics Management# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A title is added in automatically when this is ran through jsdoc, no need to put this here too.
|
||
This section covers the important aspect of metrics management in k6 - built-in implicit structures and custom explicit features. | ||
|
||
##Per-request metrics## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency - in the other documents, we use:
Heading
--------
|
||
In the above snippet, `res` is an HTTP response object containing: | ||
|
||
* `res.body` (`string` containing the HTTP response body) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of this formatting. Parentheses indicate a subsection of a sentence, inserted for clarification, without which the sentence is still complete and correct… but without the parenthesized section here, there's nothing left!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also - the word "containing" is kinda redundant.
Checks are used for functional testing: | ||
```es6 | ||
var res = http.get(“http://example.com” (http://example.xn--com-9o0a/)); | ||
check(res, { “status is 200”: (res) => res.status === 200 }); // returns false if check condition fails |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographic quotes.
``` | ||
Multiple checks can be included in a single check() call: | ||
```es6 | ||
var res = http.get(“http://example.com” (http://example.xn--com-9o0a/)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographic quotes, parentheses???
```es6 | ||
var res = http.get(“http://example.com” (http://example.xn--com-9o0a/)); | ||
check(res, { | ||
“status is 200”: (res) => res.status === 200 }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typographic quotes.
"content size = 1234 bytes": (res) => res.body.length === 1234) | ||
}); | ||
``` | ||
The percentage of successful checks are printed to stdout after the end of the load test. By default, a failed `check()` will result in the whole load test being marked as failed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mention how this is affected by -a
/--accept
?
``` | ||
The percentage of successful checks are printed to stdout after the end of the load test. By default, a failed `check()` will result in the whole load test being marked as failed. | ||
|
||
##Load test failure thresholds## |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section is redundant, at least as it stands. It most certainly shouldn't be the last thing in the document.
Not sure what happens if you push commits to a merged PR's branch, but I wanted to get this out there. I'll get around to the README once we work out how the manual page should read. |
No description provided.