ftpstats.R 1.1 KB

1234567891011121314151617181920
  1. arch <- c("source", "all", "amd64", "arm64", "i386", "alpha", "arm", "armel", "armhf", "hppa", "hurd-i386", "ia64",
  2. "kfreebsd-amd64", "kfreebsd-i386", "mips", "mipsel", "powerpc", "ppc64el", "s390", "s390x", "sparc")
  3. palette(c("midnightblue", "gold", "turquoise", "pink", "cyan", "black", "red", "OrangeRed", "green3", "blue", "magenta",
  4. "cornsilk3", "darkolivegreen3", "tomato4", "violetred2","thistle4", "steelblue2", "springgreen4",
  5. "salmon","gray"))
  6. cname <- c("date",arch)
  7. plotsize <- function(file,title,p,height=11.8,width=16.9) {
  8. bitmap(file=file,type="png16m",width=16.9,height=11.8)
  9. barplot(t(p),col = 1:19, main=title,
  10. xlab="date", ylab="size (MiB)")
  11. legend(par("usr")[1]+xinch(5),par("usr")[4]-yinch(0.1),legend=colnames(t),
  12. ncol=2,fill=1:19,xjust=1,yjust=1)
  13. }
  14. t <- (read.table("/srv/ftp-master.debian.org/misc/ftpstats.data",sep=",",header=0,row.names=1,col.names=cname))/1024/1024
  15. v <- t[(length(t$all)-90):(length(t$all)),1:19]
  16. #plotsize("/srv/ftp.debian.org/web/size.png","Daily dinstall run size by arch",t)
  17. plotsize("/srv/ftp.debian.org/web/size-quarter.png","Daily dinstall run size by arch (past quarter)",v)