source: branches/reconfiguration/modules/dspin_router/caba/test/synthetic_test/scripts/broadcast_latency.sh @ 998

Last change on this file since 998 was 998, checked in by cfuguet, 9 years ago

reconf: several improvements in the dspin_router synthetic test platform

  • Property svn:executable set to *
File size: 379 bytes
Line 
1#!/usr/bin/env sh
2# @author       Cesar Armando Fuguet Tortolero
3# @date         24 May, 2015
4# @brief
5file=$1
6awk '
7BEGIN {
8        total=0
9        targets=0
10}
11
12#   Parse the broadcast latency
13/broadcast latency +=/ {
14        latency=$5;
15        total+=latency;
16        if (latency > 0) {
17                targets++;
18        }
19}
20
21#   Validate the file
22END {
23        print "mean latency=" total/targets
24        exit 0;
25}' $file
26if [[ $? == 1 ]]; then exit 1; fi
27
Note: See TracBrowser for help on using the repository browser.