package gnuplot
const (
cpuPlotPNG = `set term png size 1024,768
set output 'cpu.png'
set timefmt '%s'
set xdata time
set title 'CPU(Cores)'
set xlabel 'Time'
plot 'cpu.data' using 1:2 with lines`
memPlotPNG = `set term png size 1024,768
set output 'mem.png'
set timefmt '%s'
set xdata time
set title 'Mem(Mb)'
set xlabel 'Time'
plot 'mem.data' using 1:2 with lines`
latencyPlotPNG = `set term png size 1024,768
set output 'latency.png'
set title 'Latency(s)'
set xlabel 'Message'
f(x)=m*x+b
fit f(x) 'latency.data' using 1:2 via m,b
plot 'latency.data' using 1:2 with lines title 'Data', f(x) title 'Trend'`
lossPlotPNG = `set term png size 1024,768
set output 'loss.png';
set xlabel 'SeqId';
set ylabel 'Lost Count'`
lossPlotDumb = `set term dumb
set xlabel 'SeqId';
set ylabel 'Lost Count'`
cpuPlotDumb = `set term dumb
set timefmt '%s'
set xdata time
set title 'CPU(Cores)'
set xlabel 'Time'
plot 'cpu.data' using 1:2 with lines`
memPlotDumb = `set term dumb
set timefmt '%s'
set xdata time
set title 'Mem(Mb)'
set xlabel 'Time'
plot 'mem.data' using 1:2 with lines`
latencyPlotDumb = `set term dumb
set title 'Latency(s)'
set xlabel 'Message'
plot 'latency.data' using 1:2 with lines`
html = `
Options
Image: %s
Total Log Stressors: %d
Lines Per Second: %d
Run Duration: %s
Payload Source: %s
Latency of logs collected based on the time the log was generated and ingested
| Total |
Size |
Elapsed |
Mean |
Min |
Max |
Median |
| Msg |
|
(s) |
(s) |
(s) |
(s) |
(s) |
| %d |
%d |
%s |
%.3f |
%.3f |
%.3f |
%.3f |
| Stream |
Min Seq |
Max Seq |
Purged |
Collected |
Percent Collected |
%s
%s