Merge pull request #758 from simonduq/contrib/nightly-plot-DAG-join

Nightly runs: keep track of DAG joining events
This commit is contained in:
Simon Duquennoy 2018-11-12 17:05:11 +01:00 committed by GitHub
commit 9f935f9565
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -70,6 +70,9 @@ def parseRPL(log):
if res:
# This was the last line, commit full topology
return {'event': 'topology' }
res = re.compile('initialized DAG').match(log)
if res:
return {'event': 'DAGinit' }
return None
def parseEnergest(log):
@ -123,6 +126,7 @@ def doParse(file):
"ranks": [],
"trickle": [],
"switches": [],
"DAGinits": [],
"topology": [],
}
@ -178,6 +182,8 @@ def doParse(file):
arrays["trickle"].append(entry)
elif(ret['event'] == 'switch'):
arrays["switches"].append(entry)
elif(ret['event'] == 'DAGinit'):
arrays["DAGinits"].append(entry)
elif(ret['event'] == 'sending'):
if not ret['message'] in arrays:
arrays[ret['message']] = []
@ -255,6 +261,7 @@ def main():
outputStats(dfs, "ranks", "rank", "mean", "RPL rank (ETX-128)")
outputStats(dfs, "switches", "pswitch", "count", "RPL parent switches (#)")
outputStats(dfs, "DAGinits", "event", "count", "RPL joining DAG (#)")
outputStats(dfs, "trickle", "trickle", "mean", "RPL Trickle period (min)")
outputStats(dfs, "DIS", "message", "count", "RPL DIS sent (#)", "rpl-dis")