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

M9: Build performance test report view #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ninetteadhikari
Copy link
Member

@ninetteadhikari ninetteadhikari commented Mar 19, 2024

This PR is for "Milestone 9: Build performance test report view" as stated in the Scope of Work. It addresses the following:

  • Add Apache echart library to create oe build performance report charts.
  • Restructure data to time and value array format to be used by echarts. It also converts test duration to minutes and adds zoom to the line charts.
  • Update measurement statistics data to include start_time so that time can be displayed instead of commit numbers on the chart. It also updates default commit history length to 300.
  • Add styling updates including labels for x and y axis, tooltip, and section descriptions.
image image image image

@ninetteadhikari ninetteadhikari added only for review This is the main PR branch and removed only for review This is the main PR branch labels Mar 19, 2024
Comment on lines 49 to 52
{
start: 0,
end: 100
}
Copy link

Choose a reason for hiding this comment

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

what does the 2nd datazoom do?

Copy link
Member Author

Choose a reason for hiding this comment

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

It seems like the second one sets the default boundary of the zoom. But I am removing the first one because it seems like its not doing anything 🤷

Copy link

Choose a reason for hiding this comment

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

So you can remove it? :)

Comment on lines 70 to 99
// Change chart size with browser resize
window.addEventListener('resize', function() {
measurement_chart.resize();
});
measurement_chart.setOption(option);
Copy link

Choose a reason for hiding this comment

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

Do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

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

this one is nice since it makes the charts responsive to screen size. Otherwise user will have to reload the page to see the chart, like this:

image

Copy link

Choose a reason for hiding this comment

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

Mh, they don't have this in the old version. Do you know if the google charts resize?

Comment on lines 25 to 48
position: function (pt) {
return [pt[0], '10%'];
},
Copy link

Choose a reason for hiding this comment

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

have you tried to remove this?

Copy link
Member Author

Choose a reason for hiding this comment

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

this just made the tooltip position fixed closer to the cursor. Its just aesthetics not necessary, so I can remove it.

Copy link

Choose a reason for hiding this comment

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

I would say we can remove it.

google.charts.setOnLoadCallback(drawChart_{{ chart_elem_id }});
function drawChart_{{ chart_elem_id }}() {
var data = new google.visualization.DataTable();
<script type="module">
Copy link

Choose a reason for hiding this comment

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

question why does it need to be a module?

pointSize: 5,
chartArea: { left: 80, right: 15 },
};
const convertToMinute = (time) => {
Copy link

@hulkoba hulkoba Mar 27, 2024

Choose a reason for hiding this comment

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

Can you name it a bit more specific?
Like convertMSToMinute or whatever the time format here is? :)

Comment on lines 16 to 17
new Date(time * 1000).getTime(), // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000.
Array.isArray(value) ? convertToMinute(value) : value // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
Copy link

Choose a reason for hiding this comment

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

Please move the comments above the code. not next to it

Comment on lines 16 to 17
new Date(time * 1000).getTime(), // The Date object takes values in milliseconds rather than seconds. So to use a Unix timestamp we have to multiply it by 1000.
Array.isArray(value) ? convertToMinute(value) : value // Assuming the array values are duration in the format [hours, minutes, seconds, milliseconds]
Copy link

Choose a reason for hiding this comment

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

I'm a bit confused here. it is time or value. and what format has the time or value?

[{{ sample.commit_num }}, {{ sample.mean.gv_value() }}],
{% endfor %}
]);
// Convert raw data to the format: [time, value]
Copy link

Choose a reason for hiding this comment

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

this comment can be dropped. looks outdated?

@@ -319,6 +319,7 @@ def measurement_stats(meas, prefix=''):
stats['quantity'] = val_cls.quantity
stats[prefix + 'sample_cnt'] = len(values)

start_time = time # Add start time for both type sysres and disk usage
Copy link

Choose a reason for hiding this comment

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

Please no comments next to the code :)

@ninetteadhikari ninetteadhikari mentioned this pull request Apr 12, 2024
@ninetteadhikari ninetteadhikari added only for review This is the main PR branch not for merging labels Apr 12, 2024
@ninetteadhikari ninetteadhikari force-pushed the m9-performance-test-report-view branch 4 times, most recently from 32ab08d to 5c0c415 Compare May 3, 2024 14:25
@ninetteadhikari ninetteadhikari force-pushed the m9-performance-test-report-view branch from 5c0c415 to 1d5e7db Compare May 22, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not for merging only for review This is the main PR branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants