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

feat(visual): toggle toolchain visibility in performance visualization #569

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 14 additions & 2 deletions results/html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ <h4>To check the latest statistics of a project for the selected board, please <
<script charset="utf-8">

var visible_elem = null;
var visible_chart_ids = [];

// sets visibility of an element with the w3-hide class by appending/removing w3-show class
function setVisibility(elem, on) {
Expand Down Expand Up @@ -183,7 +184,8 @@ <h4>To check the latest statistics of a project for the selected board, please <
}

function LineChart(canvas_name, title, unitstr, labels, datasets, legend) {
return new Chart(document.getElementById(canvas_name), {
visible_chart_ids.push(canvas_name);
const myChart = new Chart(document.getElementById(canvas_name), {
type: 'line',
data: {
labels: labels,
Expand All @@ -205,7 +207,15 @@ <h4>To check the latest statistics of a project for the selected board, please <
},
},
legend: {
display: legend,
display: true,
onClick : (t, e, i) => {
const n = e.datasetIndex
, o = i.chart;
visible_chart_ids.forEach(id => {
const chart = Chart.getChart(document.getElementById(id));
chart.isDatasetVisible(n)? chart.hide(n) : chart.show(n);
})
}
},
zoom: {
zoom: {
Expand Down Expand Up @@ -243,6 +253,7 @@ <h4>To check the latest statistics of a project for the selected board, please <
}
}
});
return myChart;
}

function handleSearchQuery() {
Expand All @@ -259,6 +270,7 @@ <h4>To check the latest statistics of a project for the selected board, please <
var device = params.get('device');
var project = params.get('project');
if (elem_id) {
visible_chart_ids = []
selectStat(elem_id, device, project);
selectGraph("runtime", device, project)
}
Expand Down
5 changes: 4 additions & 1 deletion results/result_entry.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ def null_generator():


def get_entries(json_data: dict, project: str):

def make_clks(clkdef: 'dict | float | None'):

def get_clk(freq):
clk = Clk()
clk.actual = freq
Expand Down Expand Up @@ -165,7 +167,8 @@ def make_resources(resourcesdef: 'dict | None'):
results['board'], results['toolchain'], results['max_freq'],
results['maximum_memory_use'], results['resources'],
results['runtime'], wirelength, status, results['toolchain'],
results['versions'], results['family'], results['device']
results['versions'] if 'versions' in results else {},
results['family'] if 'family' in results else {}, results['device']
)
for board, toolchain_dict, max_freq, max_mem_use, resources, runtime, \
wirelength, status, toolchain, versions, family, device in zipped:
Expand Down