From 82b5b6a0768755b6da24f8daad794f0c4bb43108 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 10 Jun 2021 17:31:41 +0200 Subject: Debug --- results/scheduler/wakeup.R | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'results/scheduler/wakeup.R') diff --git a/results/scheduler/wakeup.R b/results/scheduler/wakeup.R index 7765ff7..d11d0c2 100644 --- a/results/scheduler/wakeup.R +++ b/results/scheduler/wakeup.R @@ -42,14 +42,24 @@ if(NROW(hint_fw)!=0){ } p1=p1+ xlab("Time (hours)")+ylab("Node")+ - scale_x_continuous(breaks = ts_range, labels=ts_labels)+ + scale_x_continuous(breaks = ts_range, labels=ts_labels,expand = c(0, 0))+ scale_colour_manual(name="Legend",values=c("Hint slots"="blue","Data received"="red","Hint received"="green","Hint Forwarded"="purple"))+ theme(panel.grid.major.x = element_line(size = 1.2),panel.grid.major.y = element_blank(),panel.grid.minor = element_blank()) -stats=data%>%group_by(node)%>%summarise(n=n())%>%mutate(n=n-24) +stats=data%>%group_by(node)%>%summarise(n=n())%>%mutate(nwakeup=n-24) -p2=ggplot(stats,aes(x=node,y=n))+ - geom_bar(stat="identity")+xlab("Node")+ylab("Extra wake up count") +p2=ggplot(stats,aes(x=node,y=nwakeup))+ + geom_bar(stat="identity")+xlab("Node")+ylab("Extra wake up count")+ylim(0,10)+ + scale_y_continuous(breaks = seq(0,10)) -p=grid.arrange(p1,p2,heights=c(10,5)) +stats2=tibble( + metric=c("Hint Received","Hint Forwarded","Data Received"), + count=c(NROW(hint),NROW(hint_fw),NROW(data_rcv)) +) + +p3=ggplot(stats2,aes(x=metric,y=count))+ + geom_bar(stat="identity")+xlab("Metric")+ylab("Count")+ylim(0,20) + + +p=grid.arrange(p1,p2,p3,heights=c(10,5,5)) ggsave(plot=p,"schedule.png",dpi=300,width = 10,height=10) -- cgit v1.2.3