diff --git a/core/client.js b/core/client.js index c360809a0..db8bd117f 100644 --- a/core/client.js +++ b/core/client.js @@ -7,8 +7,6 @@ let gFiles = {}; let gApp = {files: {}, emoji: '📦'}; let gEditor; let gSplit; -let gGraphs = {}; -let gTimeSeries = {}; let gOriginalInput; let kErrorColor = "#dc322f"; @@ -431,24 +429,6 @@ function trace() { window.open(`/speedscope/#profileURL=${encodeURIComponent('/trace')}`); } -function stats() { - window.localStorage.setItem('stats', '1'); - document.getElementById("statsPane").style.display = 'flex'; -} - -function closeStats() { - window.localStorage.setItem('stats', '0'); - document.getElementById("statsPane").style.display = 'none'; -} - -function toggleStats() { - if (document.getElementById("statsPane").style.display == 'none') { - stats(); - } else { - closeStats(); - } -} - function guessMode(name) { return name.endsWith(".js") ? "javascript" : name.endsWith(".html") ? "htmlmixed" : @@ -804,57 +784,6 @@ function _receive_websocket_message(message) { }; const k_colors = ['#0f0', '#88f', '#ff0', '#f0f', '#0ff', '#f00', '#888']; let graph_key = k_groups[key]?.group || key; - let graph = gGraphs[graph_key]; - if (!graph) { - graph = { - chart: new SmoothieChart({ - millisPerPixel: 100, - minValue: 0, - grid: { - millisPerLine: 1000, - verticalSections: 10, - }, - tooltip: true, - }), - canvas: document.createElement('canvas'), - title: document.createElement('div'), - series: [], - }; - gGraphs[graph_key] = graph; - graph.canvas.width = 240; - graph.canvas.height = 64; - graph.title.innerText = graph_key; - graph.title.style.flex = '0'; - document.getElementById('graphs').appendChild(graph.title); - document.getElementById('graphs').appendChild(graph.canvas); - graph.chart.streamTo(graph.canvas, 1000); - } - - let timeseries = gTimeSeries[key]; - if (!timeseries) { - let is_multi = key != graph_key || graph.series.length > 1; - timeseries = new TimeSeries(); - gTimeSeries[key] = timeseries; - graph.chart.addTimeSeries(timeseries, {lineWidth: 2, strokeStyle: is_multi ? k_colors[graph.series.length] : '#fff'}); - graph.series.push(k_groups[key]?.name || key); - if (is_multi) { - while (graph.title.firstChild) { - graph.title.removeChild(graph.title.firstChild); - } - function makeColoredText(text, color) { - let element = document.createElement('span'); - element.style.color = color; - element.innerText = text; - return element; - } - graph.title.appendChild(makeColoredText(graph_key + ':', '#fff')); - for (let series of graph.series) { - graph.title.appendChild(makeColoredText(' ' + series, k_colors[graph.series.indexOf(series)])); - } - } - } - timeseries.append(now, message.stats[key]); - if (graph_key == 'cpu' || graph_key == 'rpc' || graph_key == 'store') { let line = document.getElementsByTagName('tf-navigation')[0].get_spark_line(graph_key, { max: 100 }); line.dataset.emoji = { @@ -1154,7 +1083,6 @@ window.addEventListener("load", function() { window.addEventListener("message", message, false); window.addEventListener("online", connectSocket); document.getElementById("name").value = window.location.pathname; - document.getElementById('closeStats').addEventListener('click', () => closeStats()); document.getElementById('closeEditor').addEventListener('click', () => closeEditor()); document.getElementById('save').addEventListener('click', () => save()); document.getElementById('icon').addEventListener('click', () => changeIcon()); @@ -1163,10 +1091,6 @@ window.addEventListener("load", function() { event.preventDefault(); trace(); }); - document.getElementById('stats_button').addEventListener('click', function(event) { - event.preventDefault(); - toggleStats(); - }); for (let tag of document.getElementsByTagName('a')) { if (tag.accessKey) { tag.classList.add('tooltip_parent'); @@ -1199,9 +1123,4 @@ window.addEventListener("load", function() { } else { closeEditor(); } - if (window.localStorage.getItem('stats') == '1') { - stats(); - } else { - closeStats(); - } }); diff --git a/core/core.js b/core/core.js index 83fd48796..0550d4688 100644 --- a/core/core.js +++ b/core/core.js @@ -936,8 +936,6 @@ loadSettings().then(function() { return staticDirectoryHandler(request, response, 'deps/speedscope/', match[1]); } else if (match = /^\/split\/([\.\w-/]*)$/.exec(request.uri)) { return staticDirectoryHandler(request, response, 'deps/split/', match[1]); - } else if (match = /^\/smoothie\/([\.\w-/]*)$/.exec(request.uri)) { - return staticDirectoryHandler(request, response, 'deps/smoothie/', match[1]); } else if (match = /^\/static(\/.*)/.exec(request.uri)) { return staticFileHandler(request, response, null, match[1]); } else if (request.uri == "/robots.txt") { diff --git a/core/index.html b/core/index.html index ecc6763a3..d8e8e78d5 100644 --- a/core/index.html +++ b/core/index.html @@ -9,12 +9,6 @@
-