-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from szkiba/feature/customization
Feature/customization
- Loading branch information
Showing
36 changed files
with
996 additions
and
300 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
// helper for adding p(99) to existing chart | ||
function addP99 (chart) { | ||
chart.series = { | ||
...chart.series, | ||
'http_req_duration_trend_p(99)': { label: 'p(99)' } | ||
} | ||
} | ||
|
||
// define request duration panel | ||
function durationPanel (suffix) { | ||
return { | ||
id: `http_req_duration_${suffix}`, | ||
title: `Request Duration ${suffix}`, | ||
metric: `http_req_duration_trend_${suffix}`, | ||
format: 'duration' | ||
} | ||
} | ||
|
||
// copy vus and http_reqs panel from default config | ||
const overview = defaultConfig.tab('overview_snapshot') | ||
|
||
// define custom panels | ||
const customPanels = [ | ||
overview.panel('vus'), | ||
overview.panel('http_reqs'), | ||
durationPanel('avg'), | ||
durationPanel('p(90)'), | ||
durationPanel('p(95)'), | ||
durationPanel('p(99)') | ||
] | ||
|
||
// copy http_req_duration chart form default config... | ||
const durationChart = { ...overview.chart('http_req_duration') } | ||
|
||
// ... and add p(99) | ||
addP99(durationChart) | ||
|
||
// define custom tab | ||
const customTab = { | ||
id: 'custom', | ||
title: 'Custom', | ||
event: overview.event, | ||
panels: customPanels, | ||
charts: [overview.chart('http_reqs'), durationChart] | ||
} | ||
|
||
// add custom tab to configuration | ||
defaultConfig.tabs.push(customTab) | ||
|
||
export default defaultConfig |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.