Utils-eurocon: script for discarding "error" lines
authorRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Mon, 28 Feb 2011 15:35:43 +0000 (17:35 +0200)
committerRazvan Deaconescu <razvan.deaconescu@cs.pub.ro>
Mon, 28 Feb 2011 18:11:27 +0000 (20:11 +0200)
error lines are lines where measured inactivity time is (erroneously)
reported to be less than inactive time

Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant [new file with mode: 0755]

diff --git a/Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant b/Utils/test-socket-signal/test/process/inactive_timespan_drop_irrelevant
new file mode 100755 (executable)
index 0000000..209336d
--- /dev/null
@@ -0,0 +1,21 @@
+#!/usr/bin/awk -f
+
+#
+# expect lines consisting of inactivity time and manifested time
+#   512   564
+#   32    54
+#
+# discard irrelevant/error lines where manifested time is shorter than
+# inactivity time
+#
+
+{
+       # only print relevant
+       if ($2 > 0) {
+               if ($2 > $1)
+                       print $1, $2;
+               if (($1-$2) / $1 < 0.10) {
+                       print $1, $2;
+               }
+       }
+}