Updated scripts to new output

This commit is contained in:
adamdunkels 2010-10-03 20:21:46 +00:00
parent cd7bbae9cc
commit 7fcad36c43
2 changed files with 14 additions and 4 deletions

View File

@ -8,8 +8,14 @@ powertrace-parse:
@echo LOG must be defined to point to the powertrace log file to parse
endif #LOG
powertrace-plot:
gnuplot $(CONTIKI)/tools/powertrace/plot-power || echo gnupot failed
powertrace-plot: powertrace-plot-node powertrace-plot-sniff
@gnuplot $(CONTIKI)/tools/powertrace/plot-power || echo gnupot failed
powertrace-plot-sniff:
@gnuplot $(CONTIKI)/tools/powertrace/plot-sniff-power || echo gnupot failed
powertrace-plot-node:
@gnuplot $(CONTIKI)/tools/powertrace/plot-node-power || echo gnupot failed
powertrace-show:
gv powertrace-power.eps

View File

@ -22,7 +22,8 @@ while(<>) {
if($packettype == 1) {
$channel .= "-ack"
}
$num_packets_for_channel{$channel}++;
$tx_for_channel{$channel} += $tx;
$rx_for_channel{$channel} += $rx;
$total += $rx + $tx;
@ -36,8 +37,11 @@ while(<>) {
}
}
print "# Columns are:\n";
print "# activity tx_dutycycle rx_dutycycle num_packets\n";
foreach $c (keys %tx_for_channel) {
print "$c " . $tx_for_channel{$c}/$total . " " . $rx_for_channel{$c}/$total . "\n";
print "$c " . $tx_for_channel{$c}/$total . " " . $rx_for_channel{$c}/$total . " " . $num_packets_for_channel{$c} . "\n";
}
print STDERR "Final / forward = " . $final / $total . "/" . $forward / $total . "\n";