Add some CPU and memory info to stats.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3820 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-02-05 17:52:37 +00:00
parent 39a1acaf38
commit 059024452c
2 changed files with 18 additions and 9 deletions

View File

@ -484,12 +484,11 @@ function receive(message) {
if (!gGraphs[key]) {
var graph = {
chart: new SmoothieChart({
millisPerPixel: 100,
minValue: 0,
grid: {
strokeStyle: 'rgb(125, 0, 0)',
fillStyle: 'rgb(60, 0, 0)',
lineWidth: 1,
millisPerLine: 15000,
verticalSections: 6,
millisPerLine: 1000,
verticalSections: 10,
},
}),
canvas: document.createElement('canvas'),
@ -503,7 +502,7 @@ function receive(message) {
document.getElementById('graphs').appendChild(div);
document.getElementById('graphs').appendChild(graph.canvas);
graph.chart.streamTo(graph.canvas, 1000);
graph.chart.addTimeSeries(graph.timeseries);
graph.chart.addTimeSeries(graph.timeseries, {lineWidth: 2});
}
gGraphs[key].timeseries.append(now, message.stats[key]);
}