Thread: [Assorted-commits] SF.net SVN: assorted: [368] hash-join/trunk/tools/LogProc.scala
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-11 05:17:45
|
Revision: 368 http://assorted.svn.sourceforge.net/assorted/?rev=368&view=rev Author: yangzhang Date: 2008-02-10 21:17:48 -0800 (Sun, 10 Feb 2008) Log Message: ----------- LogProc outputs to data/ Modified Paths: -------------- hash-join/trunk/tools/LogProc.scala Modified: hash-join/trunk/tools/LogProc.scala =================================================================== --- hash-join/trunk/tools/LogProc.scala 2008-02-11 05:17:25 UTC (rev 367) +++ hash-join/trunk/tools/LogProc.scala 2008-02-11 05:17:48 UTC (rev 368) @@ -78,7 +78,7 @@ def f(s:String) = { { for ((field,_) <- plotData) yield ( - "'" + camelToHyphen(field) + s + ".dat" + "' with linespoints title '" + fieldNameToLabel(field) + "'" + "'data/" + camelToHyphen(field) + s + ".dat" + "' with linespoints title '" + fieldNameToLabel(field) + "'" ) } mkString ", " } @@ -86,11 +86,11 @@ set terminal pdf set xlabel 'number of threads' - set output 'times.pdf' + set output 'data/times.pdf' set ylabel 'time (ms)' plot """ + f("-time") + """ - set output 'speedups.pdf' + set output 'data/speedups.pdf' set ylabel 'speedup (relative to 1 thread)' plot """ + f("-speedup") ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-02-11 15:45:28
|
Revision: 373 http://assorted.svn.sourceforge.net/assorted/?rev=373&view=rev Author: yangzhang Date: 2008-02-11 07:45:31 -0800 (Mon, 11 Feb 2008) Log Message: ----------- fixed data output path; changed ms -> s Modified Paths: -------------- hash-join/trunk/tools/LogProc.scala Modified: hash-join/trunk/tools/LogProc.scala =================================================================== --- hash-join/trunk/tools/LogProc.scala 2008-02-11 15:45:13 UTC (rev 372) +++ hash-join/trunk/tools/LogProc.scala 2008-02-11 15:45:31 UTC (rev 373) @@ -1,12 +1,14 @@ import commons.Collections._ import commons.Control._ import commons.Io._ +import commons.Debug._ +import commons.Path._ // import commons.Plotting._ import scala.collection.mutable._ object LogProc { - type FieldMap = Map[String,Int] - type MutFieldMap = HashMap[String,Int] + type FieldMap = Map[String,Double] + type MutFieldMap = HashMap[String,Double] case class Stats( ncpus: Int, values: FieldMap @@ -33,20 +35,22 @@ for (line <- lines) { if (line contains " cpus") { // Include sum. - map("sum") = sum(map.values) - if (ncpus != 0) stats += Stats(ncpus, map.clone) + if (ncpus != 0) { + map("sum") = sum(map.values) - map("actressLoading") - map("movieLoading") + stats += Stats(ncpus, map.clone) + } ncpus = line.split(" ")(1).toInt fieldIndex = Iterator from 0 map.clear } else if (line contains "main time: ") { - map(fieldName(fieldIndex.next)) = line.split(" ").last.toInt + map(fieldName(fieldIndex.next)) = line.split(" ").last.toDouble / 1000.0 } } // Build actual plot data. - val plotData = new HashMap[String,ArrayBuffer[Int]] { + val plotData = new HashMap[String,ArrayBuffer[Double]] { override def default(k: String) = { - val buf = new ArrayBuffer[Int] + val buf = new ArrayBuffer[Double] this(k) = buf buf } @@ -62,12 +66,12 @@ for ((field,times) <- plotData) { val baseline = times(0).toDouble println(field + ": " + times) - using (TextWriter(camelToHyphen(field) + "-time.dat")) { w => + using (TextWriter("data" / camelToHyphen(field) + "-time.dat")) { w => for ((time,ncpus) <- times zip ncpuList) { w.println(ncpus + " " + time) } } - using (TextWriter(camelToHyphen(field) + "-speedup.dat")) { w => + using (TextWriter("data" / camelToHyphen(field) + "-speedup.dat")) { w => for ((time,ncpus) <- times map (baseline / _) zip ncpuList) { w.println(ncpus + " " + time) } @@ -87,7 +91,7 @@ set xlabel 'number of threads' set output 'data/times.pdf' - set ylabel 'time (ms)' + set ylabel 'time (s)' plot """ + f("-time") + """ set output 'data/speedups.pdf' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <yan...@us...> - 2008-03-24 03:37:20
|
Revision: 642 http://assorted.svn.sourceforge.net/assorted/?rev=642&view=rev Author: yangzhang Date: 2008-03-23 20:37:25 -0700 (Sun, 23 Mar 2008) Log Message: ----------- fixed one-leftover-header bug Modified Paths: -------------- hash-join/trunk/tools/LogProc.scala Modified: hash-join/trunk/tools/LogProc.scala =================================================================== --- hash-join/trunk/tools/LogProc.scala 2008-03-23 22:36:31 UTC (rev 641) +++ hash-join/trunk/tools/LogProc.scala 2008-03-24 03:37:25 UTC (rev 642) @@ -28,9 +28,8 @@ // Parse logs into Stats. for (line <- lines) { if (line contains indexer) { - if (index != None) { + if (index != None) stats(index.get) += map.clone - } index = Some(line.split(" ")(1).toInt) map.clear } else { @@ -39,6 +38,8 @@ map(name) = value.toDouble / 1000.0 } } + if (index != None) + stats(index.get) += map.clone // Build plot data. val plotData = for (name <- names) yield { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |