Skip to content

Conversation

adr0sen
Copy link
Contributor

@adr0sen adr0sen commented Dec 27, 2016

No description provided.

@adr0sen adr0sen changed the title Documentation Documentation update - README.md and metrics API reference Dec 27, 2016
@adr0sen adr0sen requested a review from ragnarlonn December 27, 2016 20:46
@ragnarlonn ragnarlonn merged commit 6687699 into master Dec 28, 2016

##Per-request metrics##
```es6
var res = http.get(“http://httpbin.org” (http://httpbin.xn--org-9o0a/));
Copy link
Contributor

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.
Copy link
Contributor

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#
Copy link
Contributor

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##
Copy link
Contributor

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)
Copy link
Contributor

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!

Copy link
Contributor

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
Copy link
Contributor

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/));
Copy link
Contributor

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 },
Copy link
Contributor

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.
Copy link
Contributor

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##
Copy link
Contributor

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.

@liclac
Copy link
Contributor

liclac commented Jan 2, 2017

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.

@liclac liclac deleted the documentation branch May 17, 2017 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants