mirror of
https://gitlab.com/manzerbredes/loosely-coupled-dss.git
synced 2025-04-19 04:09:43 +00:00
Improve data analysis
This commit is contained in:
parent
84d9ce59ae
commit
0a125c3661
32 changed files with 205278 additions and 38517 deletions
43
results/scheduler/wakeup.awk
Executable file
43
results/scheduler/wakeup.awk
Executable file
|
@ -0,0 +1,43 @@
|
|||
#!/usr/bin/awk -f
|
||||
|
||||
BEGIN {
|
||||
RS="\n"
|
||||
FS=" "
|
||||
CSV_HEADER="node,wakets,sleepts,duration"
|
||||
CSV_DATA=""
|
||||
skip=1
|
||||
}
|
||||
|
||||
/wakes up/{
|
||||
gsub("]","",$0)
|
||||
wakets[$4][length(wakets[$4])+1]=$2
|
||||
skip=0
|
||||
}
|
||||
|
||||
/is sleeping/{
|
||||
gsub("]","",$0)
|
||||
if(!skip){
|
||||
sleepts[$4][length(sleepts[$4])+1]=$2
|
||||
}
|
||||
}
|
||||
|
||||
/LOG2PARSE/{
|
||||
gsub("]","",$0)
|
||||
endts[$6][length(endts[$6])+1]=$2
|
||||
}
|
||||
|
||||
END {
|
||||
print(CSV_HEADER);
|
||||
for(node in wakets){
|
||||
for(j=1;j<=length(wakets[node]);j++){
|
||||
start=wakets[node][j]
|
||||
end=endts[node][1]
|
||||
# Pay attention, the last sleep report for the last wake up is not printed
|
||||
# so use the printed sleep only if available (otherwise we use the en of the simulation)
|
||||
if(j<=length(sleepts[node])){
|
||||
end=sleepts[node][j]
|
||||
}
|
||||
print(node","start","end","end-start)
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue