User Tools

Site Tools


people:mmazur

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
people:mmazur [2005-08-12 20:55]
mmazur test
people:mmazur [2013-01-17 11:44] (current)
Line 1: Line 1:
  
  
 +====== Builder stats generation ======
 +(So I don't lose it) 
  
- :!: **Edit conflict - other version:​** ​ 
  
 +  * <​file>​egrep '​^To:​|^Date:​|^Build-Time:​|X-PLD-Builder:'​ archive |uniq>​~/​th
 +egrep '​^To:​|^Date:​|^Build-Time:​|X-PLD-Builder:'​ -r . |uniq|cut -d: -f 2-10>>​~/​th
  
- +sed -e '​s/​^2,​S://'​ -i th
  
  
 +echo '​builders={}'>​th.py;​
 +cat th|grep '​^X-PLD-Builder:'​|sort|uniq|sed -e '​s,​^X-PLD-Builder:​ \(.*\)$,​builders["​\1"​]=[],'​ >>​th.py;​
 +cat th| sed -e '​s,​^To:​ \(.*\)$,​)]\nsender="​\1",'​ | sed -e '​s,​^X-PLD-Builder:​ \(.*\)$,​builders["​\1"​]+=[ ( sender\, \\,'| sed -e '​s,​^Date:​ \(.*\) .....$,"​\1"​\,​ 0.0 \\,'| sed -e '​s,​^Build-Time:​.*real:​\([^s]*\)s.*$,​+\1 \\,' >>​th.py;​
 +echo '​)]'>>​th.py;​
  
  
- :!: **Edit conflict - other version:​** ​ 
  
  
- +import time 
 +for bname in builders: 
 +        builds=builders[bname] 
 +        for build in builds: 
 +                t=time.strptime(build[1],​ "%a, %d %b %Y %H:​%M:​%S"​) 
 +                t=time.strftime("​%Y-%m-%d %H:​%M:​%S",​ t) 
 +                print "​INSERT INTO builds VALUES ('​%s',​ '​%s',​ '​%s',​ %f);" % (bname, build[0], t, build[2])
  
  
  
  
- :!: **Edit conflict - other version:​** ​+echo '​CREATE TABLE builds (builder varchar(16),​ sender varchar(64),​ start datetime, duration float);'>​th.sql;​ 
 +python th.py |sort|uniq >> th.sql
  
  
- +</​file>​
  
  
  
  
- :!: **Edit conflict - your version:**  + [[::categoryhomepage|CategoryHomepage]] 
- +
- +
-  +
- +
- +
- +
- +
- :!: **End of edit conflict**  +
- +
- +
-  +
- +
-[[http://​ep09.pld-linux.org/​~mmazur/​|http://​ep09.pld-linux.org/​~mmazur/​]]  +
- +
- +
- +
- +
- :!: **Edit conflict - other version:**  +
- +
- +
-  +
- +
- +
- +
- +
- :!: **Edit conflict - your version:**  +
- +
- +
-  +
- +
-[[http://​ep09.pld-linux.org/​~mmazur/​|http://​ep09.pld-linux.org/​~mmazur/​]]  +
- +
- +
- +
- +
- :!: **End of edit conflict**  +
- +
- +
-  +
- +
- +
- +
- +
- :!: **Edit conflict - your version:**  +
- +
- +
-  +
- +
- +
- +
- +
- :!: **Edit conflict - your version:**  +
- +
- +
-  +
- +
-[[http://​ep09.pld-linux.org/​~mmazur/​|http://​ep09.pld-linux.org/​~mmazur/​]]  +
- +
- +
- +
- +
- :!: **End of edit conflict**  +
- +
- +
-  +
- +
- +
- +
- +
- :!: **End of edit conflict**  +
- +
- +
- +
  
  
people/mmazur.1123872951.txt.gz · Last modified: 2005-08-12 20:55 by mmazur