summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Klemkow <j.klemkow@wemelug.de>2013-01-29 13:57:41 +0100
committerJan Klemkow <j.klemkow@wemelug.de>2013-01-29 13:59:57 +0100
commitd950ab2823f0db95757b94bc02443a76d21f51cb (patch)
tree52266353073a157c789d0db4a7fc12aacddb66b8
parentbc40a293d7de58bba2b7f3e5c1e8a43cf102429e (diff)
downloadadvtime-d950ab2823f0db95757b94bc02443a76d21f51cb.tar.gz
advtime-d950ab2823f0db95757b94bc02443a76d21f51cb.tar.bz2
advtime-d950ab2823f0db95757b94bc02443a76d21f51cb.zip
add second diff over diff
-rw-r--r--src/advtime.c7
-rw-r--r--src/draw.plot8
2 files changed, 8 insertions, 7 deletions
diff --git a/src/advtime.c b/src/advtime.c
index 4c329da..24be53c 100644
--- a/src/advtime.c
+++ b/src/advtime.c
@@ -66,7 +66,7 @@ main(int argc, char **argv)
int ret, ch;
int diff_flag = 0, average_flag = 0;
int64_t timestamp = 0;
- double diff = 0.0;
+ double diff = 0.0, old_diff = 0.0;
char filename[BUFSIZ];
while ((ch = getopt(argc, argv, "ad")) != -1) {
@@ -129,8 +129,9 @@ main(int argc, char **argv)
printf("\t");
if (diff_flag == 1) {
- diff = frame_diff(frame_a, frame_b);
-// printf("%f", diff);
+ printf("%f", diff = frame_diff(frame_a, frame_b));
+ printf("\t%f", (diff - old_diff));
+ old_diff = diff;
}
if (diff > 40.0) {
diff --git a/src/draw.plot b/src/draw.plot
index c3de0a6..dc8a538 100644
--- a/src/draw.plot
+++ b/src/draw.plot
@@ -1,8 +1,8 @@
# draw frame diff graph
-set terminal svg size 800,600 dynamic;
-
-set output "graph.svg";
+#set terminal svg size 800,600 dynamic;
+#set output "graph.svg";
plot 'data.txt' using 2 with lines lt rgb "#204a87" title "average", \
- 'data.txt' using 3 with lines lt rgb "#a40000" title "diff";
+ 'data.txt' using 3 with lines lt rgb "#a40000" title "diff", \
+ 'data.txt' using 4 with lines lt rgb "#4e9a06" title "rise";