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

Styling of charts + only show charts for total stats + clean up & refactoring of charts JS code #539

Merged
merged 11 commits into from
Feb 22, 2017

Conversation

heyman
Copy link
Member

@heyman heyman commented Feb 17, 2017

This is my quick and dirty styling of the charts to better match Locust's design. There's definitely possible to make them prettier, but at least it's an improvement. We should probably restructure the JS code a bit, like moving out the chart code into it's own JS file (and own JS namespace), but that's for another PR.

I've also changed so that we only render charts for the total stats, and not two graph for every URL entry. The reason for this is that I don't think the value that is added by being able to look at the graph for a specific endpoint (especially in the current ephemeral form of the charts) doesn't justify the huge page that would be generated when running tests with many endpoint. Also it could become a performance issue.

Ping @justiniso

Styled the charts to better match the design of the UI.
@heyman heyman added this to the 0.8.0 milestone Feb 17, 2017
@cgoldberg
Copy link
Member

I've also changed so that we only render charts for the total stats

I agree ... aggregate stats are the way to go

@@ -220,8 +228,13 @@ function initChart(stat) {
}

function updateCharts(stats) {

var rsp_chart, rps_data, now, date, avt_chart, avt_data;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@heyman rsp_chart or rps_chart?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, typo. I just added those in really quick when I realized we were creating variables in the global scope. Fixed.


var rps_chart = echarts.init(rps_element.get(0), 'vintage');
rps_chart.setOption({
title: {
text: stat.name + ': RPS'
text: 'RPS',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe "Total RPS (Requests per Second)" or "Average RPS (Requests per Second)" or even "Average Req/s." We have plenty of space here so we're not saving anything by abbreviating.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to "Total Requests per Second"

echarts.registerTheme('vintage', {
color: colorPalette,
backgroundColor: '#fef8ef',
backgroundColor: '#111717',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this just be transparent rather than matching the background color?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fixed!

box-sizing: border-box;
border: 1px solid #1b1f1f;
}
#charts p.note {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpick but generally tag selectors are discouraged unless style is specifically tied to tag. In this case, the layout could change and lose the style.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@justiniso
Copy link
Member

I really like it! This is the current design for anyone checking later:

@justiniso
Copy link
Member

I've been using the charting and it's awesome. Two I would add though is the number of users and number of failures tracked over time.

Because while this tells an interesting story, it doesn't tell me that the number of users has been increasing during this time and there was actually a point where the failures spiked. It just looks like app performance has been slowly degrading when it's directly correlated with increasing rate of users.

@swordmaster2k
Copy link

This is looking really cool!

@heyman
Copy link
Member Author

heyman commented Feb 17, 2017

@justiniso Yeah, number of users, and number of failures makes sense.

On another note I've also been thinking that we could add a median line, and 95 percentile line to the existing response time chart (and a 95 percentile column to the stats table as well). Something like this, but with a design that matches Locust:

image

@heyman heyman changed the title Styling of charts + only show charts for total stats Styling of charts + only show charts for total stats + clean up & refactoring of charts JS code Feb 22, 2017
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.

4 participants