cpu time is somewhat redundant for threads=1;
authorwenzelm
Sun May 07 23:57:20 2017 +0200 (2017-05-07)
changeset 65765c67bb109cd7b
parent 65764 1af6d544c2a3
child 65766 2edb89630a80
cpu time is somewhat redundant for threads=1;
tuned output;
src/Pure/Admin/build_status.scala
     1.1 --- a/src/Pure/Admin/build_status.scala	Sun May 07 23:18:23 2017 +0200
     1.2 +++ b/src/Pure/Admin/build_status.scala	Sun May 07 23:57:20 2017 +0200
     1.3 @@ -43,7 +43,7 @@
     1.4  
     1.5  
     1.6    sealed case class Data(date: Date, entries: List[(String, List[Session])])
     1.7 -  sealed case class Session(name: String, entries: List[Entry])
     1.8 +  sealed case class Session(name: String, threads: Int, entries: List[Entry])
     1.9    {
    1.10      def timing: Timing = if (entries.isEmpty) Timing.zero else entries.head.timing
    1.11      def ml_timing: Timing = if (entries.isEmpty) Timing.zero else entries.head.ml_timing
    1.12 @@ -125,7 +125,8 @@
    1.13  
    1.14              val sessions = data_entries.getOrElse(data_name, Map.empty)
    1.15              val entries = sessions.get(name).map(_.entries) getOrElse Nil
    1.16 -            data_entries += (data_name -> (sessions + (name -> Session(name, entry :: entries))))
    1.17 +            val session = Session(name, threads, entry :: entries)
    1.18 +            data_entries += (data_name -> (sessions + (name -> session)))
    1.19            }
    1.20          })
    1.21        }
    1.22 @@ -196,18 +197,24 @@
    1.23                  plot_name
    1.24                }
    1.25  
    1.26 -              val timing_plots =
    1.27 +              val timing_plots1 =
    1.28                  List(
    1.29 -                  """ using 1:3 smooth sbezier title "cpu time (smooth)" """,
    1.30 -                  """ using 1:3 smooth csplines title "cpu time" """,
    1.31                    """ using 1:2 smooth sbezier title "elapsed time (smooth)" """,
    1.32                    """ using 1:2 smooth csplines title "elapsed time" """)
    1.33 +              val timing_plots2 =
    1.34 +                List(
    1.35 +                  """ using 1:3 smooth sbezier title "cpu time (smooth)" """,
    1.36 +                  """ using 1:3 smooth csplines title "cpu time" """)
    1.37 +              val timing_plots =
    1.38 +                if (session.threads == 1) timing_plots1
    1.39 +                else timing_plots1 ::: timing_plots2
    1.40 +
    1.41                val ml_timing_plots =
    1.42                  List(
    1.43 +                  """ using 1:4 smooth sbezier title "ML elapsed time (smooth)" """,
    1.44 +                  """ using 1:4 smooth csplines title "ML elapsed time" """,
    1.45                    """ using 1:5 smooth sbezier title "ML cpu time (smooth)" """,
    1.46 -                  """ using 1:5 smooth csplines title "ML cpu time" """,
    1.47 -                  """ using 1:4 smooth sbezier title "ML elapsed time (smooth)" """,
    1.48 -                  """ using 1:4 smooth csplines title "ML elapsed time" """)
    1.49 +                  """ using 1:5 smooth csplines title "ML cpu time" """)
    1.50  
    1.51                session.name ->
    1.52                  List(gnuplot(timing_plots, "timing"), gnuplot(ml_timing_plots, "ml_timing"))