From 2deee532cd7bae8d848dc87209e693e75056d3fc Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Wed, 8 Jan 2025 10:26:11 +0100 Subject: [PATCH 1/2] split bar graph between encoder and decoder --- .../index_complexity.html | 236 ++++++++++-------- ci/complexity_measurements/style.css | 10 +- 2 files changed, 145 insertions(+), 101 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index be435b5bea..2b22677290 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -127,16 +127,23 @@
-

IVAS FORMAT - Worst Case WMOPS Performance - per Operating Point

+

IVAS stereo to stereo - Worst Case WMOPS Performance per Operating Point

-
-
-
+

Encoder

-
-
-
+
+
+
+ +

Decoder

+ +
+
+
+ +
+
+

@@ -629,111 +636,140 @@ function WMOPS_perOP() { $.plot(elt, graph.displays, options); - elt.bind("plothover", function (event, pos, item) { - if (!item) { - // only remove if not in tooltip anymore - if ($('#tooltip:hover').length == 0) { - $("#tooltip").remove(); - } - previousPoint = null; - return; - } - - if (previousPoint && - (previousPoint[0] == item.datapoint[0]) && - (previousPoint[1] == item.datapoint[1])) { - return; + elt.bind("plothover", function (event, pos, item) { + if (!item) { + // only remove if not in tooltip anymore + if ($('#tooltip:hover').length == 0) { + $("#tooltip").remove(); } + previousPoint = null; + return; + } - previousPoint = item.datapoint; - $("#tooltip").remove(); - - var encData, decData; - var encRefData, decRefData; - var text = ""; - - if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) { - encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; - decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; - - var x = item.datapoint[0]; - var y = item.datapoint[1]; + if (previousPoint && + (previousPoint[0] == item.datapoint[0]) && + (previousPoint[1] == item.datapoint[1])) { + return; + } - var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); - var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); - var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; + previousPoint = item.datapoint; + $("#tooltip").remove(); - text += "Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "
"; + var encData, decData; + var encRefData, decRefData; + var text = ""; - text += "Worst case enc: " + scoreEnc + " WMOPS
"; - text += "Worst case dec: " + scoreDec + " WMOPS
"; - text += "Worst case codec: " + scoreCodec + " WMOPS

"; + var x = item.datapoint[0]; + var y = item.datapoint[1]; - var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; - text += "Logfile
"; + text += "Mode: " + graph.runs[x].operatingPoint + "
"; + if (graph.displays.length == 1) { + var score = Math.max(parseFloat(graph.displays[0].data[x][1]), 0); + text += "Worst case: " + score + " WMOPS
"; + } + else if (graph.displays.length == 2) { + console.log(graph.displays); + console.log(x); + if ( x % 2 != 0 ) { + // these indices are for the flt ref bars + // we need to subtract 1 to get the correct id + x = x - 1; } - else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) { - encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; - decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; - - encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2]; - decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3]; - - var x = item.datapoint[0]; - var y = item.datapoint[1]; - - var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x]; - var op = run.operatingPoint; - var codec = op.split(" - ")[1]; - - var scoreEnc, scoreDec; - - if (codec == "FLT REF") - { - x = (x - 1) / 2; - scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0); - scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0); - } - else if (codec == "BASOP") { - x = x / 2; - scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); - scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); - } - - var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; + x = Math.floor(x / 2); + console.log(x); + var score_basop = Math.max(parseFloat(graph.displays[0].data[x][1]), 0); + var score_flt_ref = Math.max(parseFloat(graph.displays[1].data[x][1]), 0); + text += "Worst case BASOP: " + score_basop + " WMOPS
"; + text += "Worst case FLT REF: " + score_flt_ref + " WMOPS
"; + } + var nEntriesWmopsGraph = graph.runs.length - 1; + text += "Logfile
"; + + // if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) { + // encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; + // decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; + // + // var x = item.datapoint[0]; + // var y = item.datapoint[1]; + // + // var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); + // var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); + // var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; + // + // text += "Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "
"; + // + // text += "Worst case enc: " + scoreEnc + " WMOPS
"; + // text += "Worst case dec: " + scoreDec + " WMOPS
"; + // text += "Worst case codec: " + scoreCodec + " WMOPS

"; + // + // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; + // text += "Logfile
"; + // } + // else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) { + // encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; + // decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; + // + // encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2]; + // decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3]; + // + // var x = item.datapoint[0]; + // var y = item.datapoint[1]; + // + // var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x]; + // var op = run.operatingPoint; + // var codec = op.split(" - ")[1]; + // + // var scoreEnc, scoreDec; + // + // if (codec == "FLT REF") + // { + // x = (x - 1) / 2; + // scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0); + // scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0); + // } + // else if (codec == "BASOP") { + // x = x / 2; + // scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); + // scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); + // } + // + // var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; + // + // text += "Mode: " + op + "
"; + // + // text += "Worst case enc: " + scoreEnc + " WMOPS
"; + // text += "Worst case dec: " + scoreDec + " WMOPS
"; + // text += "Worst case codec: " + scoreCodec + " WMOPS

"; + // + // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; + // text += "Logfile
"; + // } + showToolTip(item.pageX, item.pageY, text); - text += "Mode: " + op + "
"; + }); - text += "Worst case enc: " + scoreEnc + " WMOPS
"; - text += "Worst case dec: " + scoreDec + " WMOPS
"; - text += "Worst case codec: " + scoreCodec + " WMOPS

"; + } - var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; - text += "Logfile
"; - } - showToolTip(item.pageX, item.pageY, text); - }); + $(document).ready(function () { + var displays_enc = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.filter(function(elem) { + return elem["label"].includes("Encoder"); + }); + var displays_dec = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.filter(function(elem) { + return elem["label"].includes("Decoder"); + }); - } + var max_enc = Math.ceil(get_max_y_val_for_plotting(displays_enc, 50)); + var max_dec = Math.ceil(get_max_y_val_for_plotting(displays_dec, 50)); - $(document).ready(function () { - // need to get worst case of enc + dec combined, because values are stacked in the graph - var displays = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays; - var encData, decData; - if (displays.length == 2) { - encData = [displays[0]]; - decData = [displays[1]]; - } - else if (displays.length == 4) { - encData = [displays[0], displays[2]]; - decData = [displays[1], displays[3]]; - } - var max_enc = get_max_y_val_for_plotting(encData, 1); - var max_dec = get_max_y_val_for_plotting(decData, 1); - var max = Math.ceil( (max_enc + max_dec ) / 50) * 50; - drawGraph($("#wmops_per_op-graph"), Graphs_WMOPS_perOP.wmops_worstcase_per_op, max); + // need to clone object and replace the displays + var graph_enc = JSON.parse(JSON.stringify(Graphs_WMOPS_perOP.wmops_worstcase_per_op)); + graph_enc.displays = displays_enc; + var graph_dec = JSON.parse(JSON.stringify(Graphs_WMOPS_perOP.wmops_worstcase_per_op)); + graph_dec.displays = displays_dec; + drawGraph($("#wmops_per_op-graph-enc"), graph_enc, max_enc); + drawGraph($("#wmops_per_op-graph-dec"), graph_dec, max_dec); }); var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; @@ -743,7 +779,7 @@ function WMOPS_perOP() { Graphs_WMOPS.wmops_worstcase.runs[nEntriesWmopsGraph].fullDate + "

"; - document.getElementById("wmops_per_op-legend").innerHTML = legend; + document.getElementById("wmops_per_op-legend-enc").innerHTML = legend; } diff --git a/ci/complexity_measurements/style.css b/ci/complexity_measurements/style.css index ebce0e7677..5450bf1e86 100755 --- a/ci/complexity_measurements/style.css +++ b/ci/complexity_measurements/style.css @@ -15,6 +15,9 @@ h1 { font-weight:700; text-align: center; } +h2 { + text-align: center; +} em { font-style: normal; font-weight: bold; @@ -51,7 +54,12 @@ hr { width:1600px; float:left; } -#wmops_per_op-graph { +#wmops_per_op-graph-enc { + height:500px; + width:2400px; + float:left; +} +#wmops_per_op-graph-dec { height:500px; width:2400px; float:left; -- GitLab From 372357152193fd3abb66e03eab4ac292a798adfb Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Tue, 14 Jan 2025 10:09:13 +0100 Subject: [PATCH 2/2] remove debug output + commented code --- .../index_complexity.html | 62 ------------------- 1 file changed, 62 deletions(-) diff --git a/ci/complexity_measurements/index_complexity.html b/ci/complexity_measurements/index_complexity.html index 2b22677290..772ff38b0d 100755 --- a/ci/complexity_measurements/index_complexity.html +++ b/ci/complexity_measurements/index_complexity.html @@ -668,15 +668,12 @@ function WMOPS_perOP() { text += "Worst case: " + score + " WMOPS
"; } else if (graph.displays.length == 2) { - console.log(graph.displays); - console.log(x); if ( x % 2 != 0 ) { // these indices are for the flt ref bars // we need to subtract 1 to get the correct id x = x - 1; } x = Math.floor(x / 2); - console.log(x); var score_basop = Math.max(parseFloat(graph.displays[0].data[x][1]), 0); var score_flt_ref = Math.max(parseFloat(graph.displays[1].data[x][1]), 0); text += "Worst case BASOP: " + score_basop + " WMOPS
"; @@ -685,65 +682,6 @@ function WMOPS_perOP() { var nEntriesWmopsGraph = graph.runs.length - 1; text += "Logfile
"; - // if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 2) { - // encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; - // decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; - // - // var x = item.datapoint[0]; - // var y = item.datapoint[1]; - // - // var scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); - // var scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); - // var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; - // - // text += "Mode: " + Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x].operatingPoint + "
"; - // - // text += "Worst case enc: " + scoreEnc + " WMOPS
"; - // text += "Worst case dec: " + scoreDec + " WMOPS
"; - // text += "Worst case codec: " + scoreCodec + " WMOPS

"; - // - // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; - // text += "Logfile
"; - // } - // else if (Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays.length == 4) { - // encData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[0]; - // decData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[1]; - // - // encRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[2]; - // decRefData = Graphs_WMOPS_perOP.wmops_worstcase_per_op.displays[3]; - // - // var x = item.datapoint[0]; - // var y = item.datapoint[1]; - // - // var run = Graphs_WMOPS_perOP.wmops_worstcase_per_op.runs[x]; - // var op = run.operatingPoint; - // var codec = op.split(" - ")[1]; - // - // var scoreEnc, scoreDec; - // - // if (codec == "FLT REF") - // { - // x = (x - 1) / 2; - // scoreEnc = Math.max(parseFloat(encRefData.data[x][1]), 0); - // scoreDec = Math.max(parseFloat(decRefData.data[x][1]), 0); - // } - // else if (codec == "BASOP") { - // x = x / 2; - // scoreEnc = Math.max(parseFloat(encData.data[x][1]), 0); - // scoreDec = Math.max(parseFloat(decData.data[x][1]), 0); - // } - // - // var scoreCodec = Math.round((scoreEnc + scoreDec) * 100) / 100; - // - // text += "Mode: " + op + "
"; - // - // text += "Worst case enc: " + scoreEnc + " WMOPS
"; - // text += "Worst case dec: " + scoreDec + " WMOPS
"; - // text += "Worst case codec: " + scoreCodec + " WMOPS

"; - // - // var nEntriesWmopsGraph = Graphs_WMOPS.wmops_worstcase.runs.length - 1; - // text += "Logfile
"; - // } showToolTip(item.pageX, item.pageY, text); }); -- GitLab