session timing: show pseudo-speedup factor;
authorwenzelm
Wed, 30 Mar 2011 22:45:10 +0200
changeset 42172 e86b10c68f0b
parent 42171 620343510c88
child 42173 5d33c12ccf22
session timing: show pseudo-speedup factor;
src/Pure/System/session.ML
--- a/src/Pure/System/session.ML	Wed Mar 30 22:06:25 2011 +0200
+++ b/src/Pure/System/session.ML	Wed Mar 30 22:45:10 2011 +0200
@@ -103,10 +103,13 @@
         let
           val start = Timing.start ();
           val _ = use root;
+          val timing = Timing.result start;
+          val factor = Time.toReal (#cpu timing) / Time.toReal (#elapsed timing)
+            |> Real.fmt (StringCvt.FIX (SOME 2));
           val _ =
             Output.raw_stderr ("Timing " ^ item ^ " (" ^
               string_of_int (Multithreading.max_threads_value ()) ^ " threads, " ^
-              Timing.message (Timing.result start) ^ ")\n");
+              Timing.message timing ^ ", factor " ^ factor ^ ")\n");
         in () end
       else use root;
       finish ()))