Skip to content

Commit

Permalink
improved some plots
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Bernauer committed Apr 2, 2012
1 parent 54d5dda commit 9cc59f8
Show file tree
Hide file tree
Showing 19 changed files with 64 additions and 44 deletions.
16 changes: 8 additions & 8 deletions applications/contiki/dca/bench.results
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 129 43150 7794 246 302 1453775
# gen 107 44328 7868 252 302 1473137
# tl 116 44314 8360 232 302 1565215
# nat 129 43150 7794 246 302 672937
# gen 107 44328 7868 252 302 681054
# tl 116 44314 8360 232 302 720933
# pal nan 1318 24 36 nan nan
# (nat)/(gen) -17.05 2.73 0.95 2.44 0.00 1.33
# (nat)/(gen) -17.05 2.73 0.95 2.44 0.00 1.21
# (nat)/((gen)-(pal)) nan -0.32 0.64 -12.20 nan nan
# (gen)/(tl) 8.41 -0.03 6.25 -7.94 0.00 6.25
# (gen)/(tl) 8.41 -0.03 6.25 -7.94 0.00 5.86
(dp0
(S'dca'
p1
Expand All @@ -14,7 +14,7 @@ p2
S'cpu'
p3
tp4
I1473137
I681054
s(g1
S'tl'
p5
Expand Down Expand Up @@ -97,7 +97,7 @@ s(g1
g5
g3
tp27
I1565215
I720933
s(g1
g16
g18
Expand Down Expand Up @@ -127,7 +127,7 @@ s(g1
g12
g3
tp33
I1453775
I672937
s(g1
g2
g10
Expand Down
2 changes: 1 addition & 1 deletion applications/contiki/dca/setup/config.h
Expand Up @@ -6,7 +6,7 @@

#define DT_SEND (127 * CLOCK_SECOND)
#define DT_SOURCE (101 * CLOCK_SECOND)
#define DT_COLLECT (7 * CLOCK_SECOND)
#define DT_COLLECT (23 * CLOCK_SECOND)

#define MAX_NUMBEROF_VALUES 100

Expand Down
4 changes: 2 additions & 2 deletions applications/contiki/dca/setup/sink.c
Expand Up @@ -45,14 +45,14 @@ static void tcpip_handler(void) {

counter++;

printf("trace: received values: %d/4: ", counter);
printf("trace: received values: %d/5: ", counter);
for (i=0; i<numberof_values; i++) {
memcpy(&value, &appdata[i * sizeof(uint32_t)], sizeof(uint32_t));
printf("%lu ", value);
}
printf("\n");

if (counter == 4) {
if (counter == 5) {
printf("QUIT\n");
}
}
Expand Down
Binary file modified applications/contiki/plots/cpu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions applications/contiki/plots/cpu.py
Expand Up @@ -2,16 +2,19 @@
import os

script = """
set terminal png
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set style data histogram
set style histogram cluster gap 1
set palette gray
set style fill pattern 1 border
set key left
set auto x
set yrange [0:*]
set yrange [0:900000]
set ylabel "CPU cycles"
plot '%(infile)s' using 2:xtic(1) title col, '' using 3:xtic(1) title col, '' using 4:xtic(1) title col
"""
Expand Down
Binary file modified applications/contiki/plots/loc.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions applications/contiki/plots/loc.py
Expand Up @@ -3,16 +3,20 @@
import os

script = """
set terminal png
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set style data histogram
set style histogram cluster gap 1
set palette gray
set style fill pattern 1 border
set key left
set auto x
set yrange [0:*]
set ylabel "lines of code"
plot '%(infile)s' using 2:xtic(1) title col, '' using 3:xtic(1) title col, '' using 4:xtic(1) title col
"""

Expand Down
4 changes: 2 additions & 2 deletions applications/contiki/plots/number.txt
@@ -1,8 +1,8 @@

cpu
===
overhead: tl: max: 11.83
overhead: gen: max: 2.10
overhead: tl: max: 11.64
overhead: gen: max: 2.28

loc
===
Expand Down
Binary file modified applications/contiki/plots/pt_ram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions applications/contiki/plots/pt_ram.py
Expand Up @@ -2,16 +2,18 @@
import os

script = """
set terminal pngcairo size 1024, 1024
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set key inside right top vertical Right noreverse noenhanced autotitles nobox
set style data linespoints
set palette gray
set auto x
set key left
set xrange [-0.5:3.5]
set auto y
set ylabel "RAM [byte]"
set xlabel "number of worker threads"
plot '%(infile)s' using 2:xtic(1) title columnheader(2), for [i=3:4] '' using i title columnheader(i)
"""

Expand Down
Binary file modified applications/contiki/plots/pt_text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions applications/contiki/plots/pt_text.py
Expand Up @@ -2,16 +2,18 @@
import os

script = """
set terminal pngcairo size 1024, 1024
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set key inside right top vertical Right noreverse noenhanced autotitles nobox
set style data linespoints
set palette gray
set auto x
set key left
set xrange [-0.5:3.5]
set auto y
set ylabel "text [byte]"
set xlabel "number of worker threads"
plot '%(infile)s' using 2:xtic(1) title columnheader(2), for [i=3:5] '' using i title columnheader(i)
"""

Expand Down
Binary file modified applications/contiki/plots/ram.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 7 additions & 4 deletions applications/contiki/plots/ram.py
Expand Up @@ -3,18 +3,21 @@
import os

script = """
set terminal pngcairo size 1024, 1024
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set style histogram rowstacked title offset character 2, 0.25, 0
set style data histograms
set style histogram rowstacked title
set style fill pattern 1 border
set palette gray
set auto x
set yrange [0:*]
plot newhistogram "dca", '%(infile)s' using 2:xtic(1) t col, '' u 3 t col, '' u 4 t col, newhistogram "coap", '' u 5:xtic(1) t col, '' u 6 t col, '' u 7 t col, newhistogram "rpc2", '' u 8:xtic(1) t col, '' u 9 t col, '' u 10 t col
set ylabel "RAM [bytes]"
plot newhistogram "dca", '%(infile)s' using 2:xtic(1) t col, '' u 3 t col, '' u 4 t col, \\
newhistogram "coap", '' u 5:xtic(1) t col, '' u 6 t col, '' u 7 t col, \\
newhistogram "rpc2", '' u 8:xtic(1) t col, '' u 9 t col, '' u 10 t col
"""

def plot(path, values, (apps_, variants_, measurements_), numbers):
Expand Down
Binary file modified applications/contiki/plots/text.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions applications/contiki/plots/text.py
Expand Up @@ -3,19 +3,25 @@
import os

script = """
set terminal pngcairo size 1024, 1024
set terminal pngcairo mono size 640, 480
set output '%(outfile)s.png'
set style histogram rowstacked title offset character 2, 0.25, 0
set style data histograms
set style histogram rowstacked title
set style fill pattern 1 border
set palette gray
set datafile missing '0'
set key left
set auto x
set yrange [0:*]
plot newhistogram "dca", '%(infile)s' using 2:xtic(1) t col, '' u 3 t col, newhistogram "coap", '' u 4:xtic(1) t col, '' u 5 t col, newhistogram "rpc2", '' u 6:xtic(1) t col, '' u 7 t col
set ylabel "text [bytes]"
plot newhistogram "dca", '%(infile)s' using 2:xtic(1) t col, '' u 3 t col, \\
newhistogram "coap", '' u 4:xtic(1) t col, '' u 5 t col, \\
newhistogram "rpc2", '' u 6:xtic(1) t col, '' u 7 t col
"""

def plot(path, values_, (apps_, variants_, measurements_), numbers):
Expand Down
16 changes: 8 additions & 8 deletions applications/contiki/rpc2/bench.results
@@ -1,11 +1,11 @@
# loc text bss data stack cpu
# nat 155 44226 7642 246 302 1918281
# gen 143 45598 7750 252 302 1934385
# tl 151 45326 8210 238 302 1999983
# nat 155 44226 7642 246 302 752374
# gen 143 45598 7750 252 302 758446
# tl 151 45326 8210 238 302 784910
# pal nan 1150 0 30 nan nan
# (nat)/(gen) -7.74 3.10 1.41 2.44 0.00 0.84
# (nat)/(gen) -7.74 3.10 1.41 2.44 0.00 0.81
# (nat)/((gen)-(pal)) nan 0.50 1.41 -9.76 nan nan
# (gen)/(tl) 5.59 -0.60 5.94 -5.56 0.00 3.39
# (gen)/(tl) 5.59 -0.60 5.94 -5.56 0.00 3.49
(dp0
(S'rpc2'
p1
Expand Down Expand Up @@ -44,12 +44,12 @@ g7
S'cpu'
p13
tp14
I1918281
I752374
s(g1
g11
g13
tp15
I1934385
I758446
s(g1
g2
g8
Expand Down Expand Up @@ -122,7 +122,7 @@ s(g1
g21
g13
tp32
I1999983
I784910
s(g1
g11
g25
Expand Down
2 changes: 1 addition & 1 deletion applications/contiki/rpc2/setup/client.c
Expand Up @@ -29,7 +29,7 @@ PROCESS_THREAD(rpc_client, ev, data)

static int counter = 0;
etimer_set(&et, CALL_INTERVAL);
for (counter=0; counter<10; counter++) {
for (counter=0; counter<4; counter++) {
static int pending = 0;
PROCESS_YIELD_UNTIL(etimer_expired(&et));

Expand Down
2 changes: 1 addition & 1 deletion benchmark/plotting.py
Expand Up @@ -25,7 +25,7 @@ def out(f, row):

def linespoints(values, apps, variants, measurements):
plotdata = StringIO.StringIO()
out(plotdata, ["app"] + ["%s-%s" % (v, m) for v in variants for m in measurements])
out(plotdata, ["app"] + [v for v in variants for m in measurements])
for a in apps:
out(plotdata, [a] + [values[(a, v, m)] for v in variants for m in measurements])
return plotdata.getvalue()
Expand Down

0 comments on commit 9cc59f8

Please sign in to comment.