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

Update Custom Metrics / Performance Measure with Trend param isTime == true #1436

Merged
merged 7 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/sources/next/using-k6-browser/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const options = {
},
};

const myTrend = new Trend('total_action_time');
const myTrend = new Trend('total_action_time',true);

export default async function () {
const page = browser.newPage();
Expand Down Expand Up @@ -152,7 +152,7 @@ export default async function () {
JSON.parse(JSON.stringify(window.performance.getEntriesByName('total-action-time')))[0].duration
);

myTrend.add(total_action_time);
myTrend.add(totalActionTime);
mdcruz marked this conversation as resolved.
Show resolved Hide resolved
} finally {
page.close();
}
Expand All @@ -166,5 +166,5 @@ After you run the test, you should see a similar output as the one below.
```bash
iteration_duration..........: avg=1.06s min=1.06s med=1.06s max=1.06s p(90)=1.06s p(95)=1.06s
iterations..................: 1 0.70866/s
total_action_time.............: avg=295.3 min=295.3 med=295.3 max=295.3 p(90)=295.3 p(95)=295.3
total_action_time.............: avg=295.3ms min=295.3ms med=295.3ms max=295.3ms p(90)=295.3ms p(95)=295.3ms
```
8 changes: 4 additions & 4 deletions docs/sources/v0.47.x/using-k6-browser/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export const options = {
},
};

const myTrend = new Trend('total_action_time');
const myTrend = new Trend('total_action_time',true);

export default async function () {
const page = browser.newPage();
Expand Down Expand Up @@ -152,7 +152,7 @@ export default async function () {
JSON.parse(JSON.stringify(window.performance.getEntriesByName('total-action-time')))[0].duration
);

myTrend.add(total_action_time);
myTrend.add(totalActionTime);
mdcruz marked this conversation as resolved.
Show resolved Hide resolved
} finally {
page.close();
}
Expand All @@ -166,5 +166,5 @@ After you run the test, you should see a similar output as the one below.
```bash
iteration_duration..........: avg=1.06s min=1.06s med=1.06s max=1.06s p(90)=1.06s p(95)=1.06s
iterations..................: 1 0.70866/s
total_action_time.............: avg=295.3 min=295.3 med=295.3 max=295.3 p(90)=295.3 p(95)=295.3
```
total_action_time.............: avg=295.3ms min=295.3ms med=295.3ms max=295.3ms p(90)=295.3ms p(95)=295.3ms
```
Loading