4 # data collected from M2 pickle files
5 dnc <- read.csv('daily-available-node-count.csv', sep=',', header=TRUE)
7 dnc2<-add_timestamp(dnc)
9 tstamp_08 <-unclass(as.POSIXct("2008-05-07", origin="1970-01-01"))[1]
10 dnc2 <- dnc2[which( dnc2$start > tstamp_08 ),]
13 dates <-seq(as.Date('2008-05-07'), as.Date('2009-05-07'), 'week')
14 months <- format(dates, "%b")
15 hbreaks<-unclass(as.POSIXct(dates))
17 x_start<-unclass(as.POSIXct("2008-05-07", origin="1970-01-01"))[1]
18 x_end <-unclass(as.POSIXct("2009-07-1", origin="1970-01-01"))[1]
21 par(mai=c(.9,.8,.2,.2))
22 #start_image("daily-node-count.png", height=400)
23 plot(dnc2$start[which(!is.na(dnc2$available))], dnc2$available[which(!is.na(dnc2$available))],
24 type='l', col='red', ylim=c(0,600), xlim=c(x_start, x_end),
25 xlab="Date", ylab="Online Node Count", axes=F)
27 lines(dnc2$start[which(!is.na(dnc2$available) & dnc2$start > tstamp_0510 & dnc2$start <= tstamp_0815)], dnc2$available[which(!is.na(dnc2$available)& dnc2$start > tstamp_0510 & dnc2$start <= tstamp_0815)], type='l', col='green')
29 lines(dnc2$start[which(!is.na(dnc2$available) & dnc2$start > tstamp_1105 & dnc2$start <= tstamp_0223)], dnc2$available[which(!is.na(dnc2$available)& dnc2$start > tstamp_1105 & dnc2$start <= tstamp_0223)], type='l', col='blue')
30 #lines(dnc2$start[which(!is.na(dnc2$available))], dnc2$available[which(!is.na(dnc2$available))],
31 #type='l', col='red', ylim=c(0,1000))
33 axis(1, cex.axis=0.7, labels=months, at=hbreaks)
37 #tstamp_0510 <-abline_at_date("2008-05-10", col='grey20', lty=0, height=570)
38 # dates takes from reboot_image() output for API events.
40 tstamp_0610 <-abline_at_date("2008-06-10", col='grey20', lty=2, height=570)
41 tstamp_0815 <-abline_at_date("2008-08-15", col='grey70', lty=1, height=570)
44 #tstamp_0905 <-abline_at_date("2008-09-05", col='grey70', height=570)
45 tstamp_0924 <-abline_at_date("2008-09-24", col='grey70', lty=1, height=570)
46 tstamp_1015 <-abline_at_date("2008-10-15", col='grey20', lty=2, height=570)
48 #tstamp_1105 <-abline_at_date("2008-11-05", col='white', lty=2, height=570)
49 #tstamp_1214 <-abline_at_date("2008-12-14", col='grey70', height=570)
50 tstamp_0223 <-abline_at_date("2009-02-23", col='grey70', height=570)
52 #tstamp_0313 <-abline_at_date("2009-03-13", col='grey70', height=570)
54 #text(x=c(tstamp_0610+(tstamp_0815-tstamp_0610)/2,
55 # tstamp_0815+(tstamp_0905-tstamp_0815)/2,
56 # tstamp_0924+(tstamp_1015-tstamp_0924)/2,
57 # tstamp_1015+(tstamp_1214-tstamp_1015)/2,
58 # tstamp_1214+(tstamp_0223-tstamp_1214)/2,
59 # tstamp_0223+(tstamp_0313-tstamp_0223)/2),
61 # labels=c("bug1", 'fix1', 'fix2', 'fix3', 'bug2', 'fix4')) #, 'fix 2', 'fix 3', 'fix 4'))
68 labels=c("bug1", 'fix1', 'fix2')) #, 'fix 2', 'fix 3', 'fix 4'))
75 labels=c('bug2', 'fix3')) #, 'fix 2', 'fix 3', 'fix 4'))
77 mtext("2008 2009", 1,2)
78 legend(unclass(as.POSIXct("2009-02-23", origin="1970-01-01"))[1], 200,
80 legend=c("Kernel Bug", "Notice Bug", "Typical MyOps", 'Bugs', 'Fixes'),
82 col=c('green', 'blue', 'red', 'grey20', 'grey70'),
83 lty=c(1, 1, 1, 2, 1), merge=T)
85 #legend=c("Registered", "Online", 'Kernel Update', 'MyOps Event'),
86 #pch=c('-', '-', '-', '-'),
87 #col=c('blue', 'red', 'grey20', 'grey70'),
88 #lty=c(1, 1, 2, 1), merge=T)