Increase TTL for most data points
[khatus.git] / bin / khatus_transform_total_to_diff
1 #! /usr/bin/awk -f
2
3 BEGIN {
4 FS = msg_fs ? msg_fs : "|"
5 OFS = msg_fs ? msg_fs : "|"
6 Kfs = key_fs ? key_fs : ":"
7 }
8
9 # Modify the record we're interested in
10 $1 == status && $2 == src && ($3 ~ ("^" key_prefix)) {
11 key = $3
12 val = $4
13 prev[key] = curr[key]
14 curr[key] = val
15 diff[key] = curr[key] - prev[key]
16 print($1, $2, $3, diff[key])
17 next
18 }
19
20 # Let everything else through untouched
21 //
This page took 0.058959 seconds and 4 git commands to generate.