[Swift-devel] patch: dostageinfile.transitions

Allan Espinosa aespinosa at cs.uchicago.edu
Tue Nov 16 18:17:23 CST 2010


Support for dostageinfile.png and dostageinfile-total.png .  Hopefully this is a
more precise plot of actual file stageins.


diff --git a/libexec/log-processing/log-to-dostageinfile-transitions
b/libexec/log-processing/log-to-dostageinfile-transitions
new file mode 100644
index 0000000..48dd399
--- /dev/null
+++ b/libexec/log-processing/log-to-dostageinfile-transitions
@@ -0,0 +1,11 @@
+#!/usr/bin/env ruby
+
+require 'time'
+
+$stdin.grep(/vdl:dostageinfile/).each do |line|
+  x = line.match(/^(\S*\ \S*)\ \S*\ \S*\ (\S*)\ file=(\S*)\
srchost=(\S*) \S*\ \S* desthost=(\S*)/)
+  oras = Time.parse(x[1]).to_f
+  id = "#{x[3]}-#{x[4]}-#{x[5]}"
+  state = x[2].match(/(START|END)/)[1]
+  puts "#{oras} #{id} #{state}"
+end
diff --git a/libexec/log-processing/makefile b/libexec/log-processing/makefile
index 40bdb8d..9a52f5b 100644
--- a/libexec/log-processing/makefile
+++ b/libexec/log-processing/makefile
@@ -95,6 +95,9 @@ createdirset.transitions: $(LOG)
 dostagein.transitions: $(LOG)
 	log-to-dostagein-transitions < $(LOG) > dostagein.transitions

+dostageinfile.transitions: $(LOG)
+	log-to-dostageinfile-transitions < $(LOG) > dostageinfile.transitions
+
 dostageout.transitions: $(LOG)
 	log-to-dostageout-transitions < $(LOG) > dostageout.transitions


-- 
Allan M. Espinosa <http://amespinosa.wordpress.com>
PhD student, Computer Science
University of Chicago <http://people.cs.uchicago.edu/~aespinosa>



More information about the Swift-devel mailing list