src/Pure/Admin/build_status.scala
author wenzelm
Tue May 16 22:57:12 2017 +0200 (2017-05-16)
changeset 65847 ad35427dbe88
parent 65838 30c2d78b5d38
child 65848 861a3ee712dd
permissions -rw-r--r--
less restrictive filter: omit empty charts, but show latest timing;
wenzelm@65743
     1
/*  Title:      Pure/Admin/build_status.scala
wenzelm@63686
     2
    Author:     Makarius
wenzelm@63686
     3
wenzelm@65743
     4
Present recent build status information from database.
wenzelm@63686
     5
*/
wenzelm@63686
     6
wenzelm@63686
     7
package isabelle
wenzelm@63686
     8
wenzelm@63686
     9
wenzelm@65743
    10
object Build_Status
wenzelm@63686
    11
{
wenzelm@65799
    12
  /* defaults */
wenzelm@65799
    13
wenzelm@65799
    14
  val default_target_dir = Path.explode("build_status")
wenzelm@65799
    15
  val default_image_size = (800, 600)
wenzelm@65799
    16
  val default_history = 30
wenzelm@65799
    17
wenzelm@65799
    18
  def default_profiles: List[Profile] =
wenzelm@65799
    19
    Jenkins.build_status_profiles ::: Isabelle_Cronjob.build_status_profiles
wenzelm@65799
    20
wenzelm@65799
    21
wenzelm@65791
    22
  /* data profiles */
wenzelm@65791
    23
wenzelm@65798
    24
  sealed case class Profile(description: String, history: Int, sql: String)
wenzelm@65791
    25
  {
wenzelm@65799
    26
    def days(options: Options): Int = options.int("build_log_history") max history
wenzelm@65799
    27
wenzelm@65799
    28
    def stretch(options: Options): Double =
wenzelm@65799
    29
      (days(options) max default_history min (default_history * 5)).toDouble / default_history
wenzelm@65799
    30
wenzelm@65799
    31
    def select(options: Options, columns: List[SQL.Column], only_sessions: Set[String]): SQL.Source =
wenzelm@65791
    32
    {
wenzelm@65791
    33
      Build_Log.Data.universal_table.select(columns, distinct = true,
wenzelm@65791
    34
        sql = "WHERE " +
wenzelm@65799
    35
          Build_Log.Data.pull_date + " > " + Build_Log.Data.recent_time(days(options)) + " AND " +
wenzelm@65791
    36
          Build_Log.Data.status + " = " + SQL.string(Build_Log.Session_Status.finished.toString) +
wenzelm@65804
    37
          (if (only_sessions.isEmpty) ""
wenzelm@65804
    38
           else " AND " + SQL.member(Build_Log.Data.session_name.ident, only_sessions)) +
wenzelm@65804
    39
          " AND " + SQL.enclose(sql) +
wenzelm@65791
    40
          " ORDER BY " + Build_Log.Data.pull_date + " DESC")
wenzelm@65791
    41
    }
wenzelm@65791
    42
  }
wenzelm@65791
    43
wenzelm@65791
    44
wenzelm@65785
    45
  /* build status */
wenzelm@65785
    46
wenzelm@65785
    47
  def build_status(options: Options,
wenzelm@65785
    48
    progress: Progress = No_Progress,
wenzelm@65785
    49
    profiles: List[Profile] = default_profiles,
wenzelm@65785
    50
    only_sessions: Set[String] = Set.empty,
wenzelm@65785
    51
    verbose: Boolean = false,
wenzelm@65785
    52
    target_dir: Path = default_target_dir,
wenzelm@65785
    53
    image_size: (Int, Int) = default_image_size)
wenzelm@65785
    54
  {
wenzelm@65785
    55
    val data =
wenzelm@65785
    56
      read_data(options, progress = progress, profiles = profiles,
wenzelm@65785
    57
        only_sessions = only_sessions, verbose = verbose)
wenzelm@65785
    58
wenzelm@65785
    59
    present_data(data, progress = progress, target_dir = target_dir, image_size = image_size)
wenzelm@65785
    60
  }
wenzelm@65736
    61
wenzelm@65736
    62
wenzelm@65791
    63
  /* read data */
wenzelm@65736
    64
wenzelm@65792
    65
  sealed case class Data(date: Date, entries: List[Data_Entry])
wenzelm@65799
    66
  sealed case class Data_Entry(
wenzelm@65799
    67
    name: String, hosts: List[String], stretch: Double, sessions: List[Session])
wenzelm@65765
    68
  sealed case class Session(name: String, threads: Int, entries: List[Entry])
wenzelm@65754
    69
  {
wenzelm@65795
    70
    require(entries.nonEmpty)
wenzelm@65795
    71
wenzelm@65796
    72
    def pull_date: Date = entries.head.pull_date
wenzelm@65796
    73
    def isabelle_version: String = entries.head.isabelle_version
wenzelm@65796
    74
    def afp_version: String = entries.head.afp_version
wenzelm@65796
    75
wenzelm@65795
    76
    def timing: Timing = entries.head.timing
wenzelm@65795
    77
    def ml_timing: Timing = entries.head.ml_timing
wenzelm@65762
    78
    def order: Long = - timing.elapsed.ms
wenzelm@65769
    79
wenzelm@65769
    80
    def check_timing: Boolean = entries.length >= 3
wenzelm@65769
    81
    def check_heap: Boolean = entries.forall(_.heap_size > 0)
wenzelm@65754
    82
  }
wenzelm@65796
    83
  sealed case class Entry(pull_date: Date, isabelle_version: String, afp_version: String,
wenzelm@65796
    84
    timing: Timing, ml_timing: Timing, heap_size: Long)
wenzelm@65736
    85
wenzelm@65736
    86
  def read_data(options: Options,
wenzelm@65736
    87
    progress: Progress = No_Progress,
wenzelm@65785
    88
    profiles: List[Profile] = default_profiles,
wenzelm@65736
    89
    only_sessions: Set[String] = Set.empty,
wenzelm@65750
    90
    verbose: Boolean = false): Data =
wenzelm@65736
    91
  {
wenzelm@65754
    92
    val date = Date.now()
wenzelm@65792
    93
    var data_hosts = Map.empty[String, Set[String]]
wenzelm@65799
    94
    var data_stretch = Map.empty[String, Double]
wenzelm@65762
    95
    var data_entries = Map.empty[String, Map[String, Session]]
wenzelm@63688
    96
wenzelm@65792
    97
    def get_hosts(data_name: String): Set[String] =
wenzelm@65792
    98
      data_hosts.getOrElse(data_name, Set.empty)
wenzelm@65792
    99
wenzelm@65736
   100
    val store = Build_Log.store(options)
wenzelm@65736
   101
    using(store.open_database())(db =>
wenzelm@64089
   102
    {
wenzelm@65764
   103
      for (profile <- profiles.sortBy(_.description)) {
wenzelm@65764
   104
        progress.echo("input " + quote(profile.description))
wenzelm@65736
   105
        val columns =
wenzelm@65736
   106
          List(
wenzelm@65736
   107
            Build_Log.Data.pull_date,
wenzelm@65792
   108
            Build_Log.Prop.build_host,
wenzelm@65796
   109
            Build_Log.Prop.isabelle_version,
wenzelm@65796
   110
            Build_Log.Prop.afp_version,
wenzelm@65752
   111
            Build_Log.Settings.ISABELLE_BUILD_OPTIONS,
wenzelm@65736
   112
            Build_Log.Settings.ML_PLATFORM,
wenzelm@65736
   113
            Build_Log.Data.session_name,
wenzelm@65736
   114
            Build_Log.Data.threads,
wenzelm@65736
   115
            Build_Log.Data.timing_elapsed,
wenzelm@65736
   116
            Build_Log.Data.timing_cpu,
wenzelm@65736
   117
            Build_Log.Data.timing_gc,
wenzelm@65736
   118
            Build_Log.Data.ml_timing_elapsed,
wenzelm@65736
   119
            Build_Log.Data.ml_timing_cpu,
wenzelm@65769
   120
            Build_Log.Data.ml_timing_gc,
wenzelm@65769
   121
            Build_Log.Data.heap_size)
wenzelm@63700
   122
wenzelm@65752
   123
        val Threads_Option = """threads\s*=\s*(\d+)""".r
wenzelm@65752
   124
wenzelm@65799
   125
        val sql = profile.select(options, columns, only_sessions)
wenzelm@65750
   126
        if (verbose) progress.echo(sql)
wenzelm@65750
   127
wenzelm@65750
   128
        db.using_statement(sql)(stmt =>
wenzelm@65736
   129
        {
wenzelm@65740
   130
          val res = stmt.execute_query()
wenzelm@65740
   131
          while (res.next()) {
wenzelm@65766
   132
            val session_name = res.string(Build_Log.Data.session_name)
wenzelm@65764
   133
            val threads =
wenzelm@65764
   134
            {
wenzelm@65764
   135
              val threads1 =
wenzelm@65764
   136
                res.string(Build_Log.Settings.ISABELLE_BUILD_OPTIONS) match {
wenzelm@65766
   137
                  case Threads_Option(Value.Int(i)) if session_name == "Pure" => i
wenzelm@65764
   138
                  case _ => 1
wenzelm@65764
   139
                }
wenzelm@65764
   140
              val threads2 = res.get_int(Build_Log.Data.threads).getOrElse(1)
wenzelm@65764
   141
              threads1 max threads2
wenzelm@65764
   142
            }
wenzelm@65766
   143
            val ml_platform = res.string(Build_Log.Settings.ML_PLATFORM)
wenzelm@65762
   144
            val data_name =
wenzelm@65764
   145
              profile.description +
wenzelm@65764
   146
                (if (ml_platform.startsWith("x86_64")) ", 64bit" else "") +
wenzelm@65764
   147
                (if (threads == 1) "" else ", " + threads + " threads")
wenzelm@63703
   148
wenzelm@65799
   149
            res.get_string(Build_Log.Prop.build_host).foreach(host =>
wenzelm@65799
   150
              data_hosts += (data_name -> (get_hosts(data_name) + host)))
wenzelm@65799
   151
wenzelm@65799
   152
            data_stretch += (data_name -> profile.stretch(options))
wenzelm@65799
   153
wenzelm@65736
   154
            val entry =
wenzelm@65796
   155
              Entry(
wenzelm@65796
   156
                pull_date = res.date(Build_Log.Data.pull_date),
wenzelm@65796
   157
                isabelle_version = res.string(Build_Log.Prop.isabelle_version),
wenzelm@65796
   158
                afp_version = res.string(Build_Log.Prop.afp_version),
wenzelm@65796
   159
                timing =
wenzelm@65796
   160
                  res.timing(
wenzelm@65796
   161
                    Build_Log.Data.timing_elapsed,
wenzelm@65796
   162
                    Build_Log.Data.timing_cpu,
wenzelm@65796
   163
                    Build_Log.Data.timing_gc),
wenzelm@65796
   164
                ml_timing =
wenzelm@65796
   165
                  res.timing(
wenzelm@65796
   166
                    Build_Log.Data.ml_timing_elapsed,
wenzelm@65796
   167
                    Build_Log.Data.ml_timing_cpu,
wenzelm@65796
   168
                    Build_Log.Data.ml_timing_gc),
wenzelm@65769
   169
                heap_size = res.long(Build_Log.Data.heap_size))
wenzelm@65736
   170
wenzelm@65762
   171
            val sessions = data_entries.getOrElse(data_name, Map.empty)
wenzelm@65766
   172
            val entries = sessions.get(session_name).map(_.entries) getOrElse Nil
wenzelm@65766
   173
            val session = Session(session_name, threads, entry :: entries)
wenzelm@65766
   174
            data_entries += (data_name -> (sessions + (session_name -> session)))
wenzelm@65736
   175
          }
wenzelm@65736
   176
        })
wenzelm@65736
   177
      }
wenzelm@65736
   178
    })
wenzelm@65736
   179
wenzelm@65792
   180
    val sorted_entries =
wenzelm@65762
   181
      (for {
wenzelm@65792
   182
        (name, sessions) <- data_entries.toList
wenzelm@65847
   183
        sorted_sessions <- proper_list(sessions.toList.map(_._2).sortBy(_.order))
wenzelm@65799
   184
      }
wenzelm@65799
   185
      yield {
wenzelm@65799
   186
        val hosts = get_hosts(name).toList.sorted
wenzelm@65799
   187
        val stretch = data_stretch(name)
wenzelm@65799
   188
        Data_Entry(name, hosts, stretch, sorted_sessions)
wenzelm@65799
   189
      }).sortBy(_.name)
wenzelm@65792
   190
wenzelm@65792
   191
    Data(date, sorted_entries)
wenzelm@65736
   192
  }
wenzelm@65736
   193
wenzelm@65736
   194
wenzelm@65736
   195
  /* present data */
wenzelm@65736
   196
wenzelm@65736
   197
  def present_data(data: Data,
wenzelm@65736
   198
    progress: Progress = No_Progress,
wenzelm@65736
   199
    target_dir: Path = default_target_dir,
wenzelm@65759
   200
    image_size: (Int, Int) = default_image_size)
wenzelm@65736
   201
  {
wenzelm@65791
   202
    def clean_name(name: String): String =
wenzelm@65791
   203
      name.flatMap(c => if (c == ' ' || c == '/') "_" else if (c == ',') "" else c.toString)
wenzelm@65791
   204
wenzelm@65838
   205
    HTML.write_document(target_dir, "index.html",
wenzelm@65838
   206
      List(HTML.title("Isabelle build status")),
wenzelm@65838
   207
      List(HTML.chapter("Isabelle build status"),
wenzelm@65838
   208
        HTML.par(
wenzelm@65838
   209
          List(HTML.description(
wenzelm@65838
   210
            List(HTML.text("status date:") -> HTML.text(data.date.toString))))),
wenzelm@65838
   211
        HTML.par(
wenzelm@65838
   212
          List(HTML.itemize(data.entries.map({ case data_entry =>
wenzelm@65838
   213
            List(HTML.link(clean_name(data_entry.name) + "/index.html",
wenzelm@65838
   214
              HTML.text(data_entry.name))) }))))))
wenzelm@65786
   215
wenzelm@65792
   216
    for (data_entry <- data.entries) {
wenzelm@65792
   217
      val data_name = data_entry.name
wenzelm@65792
   218
wenzelm@65799
   219
      val image_width = (image_size._1 * data_entry.stretch).toInt
wenzelm@65799
   220
      val image_height = image_size._2
wenzelm@65799
   221
wenzelm@65786
   222
      progress.echo("output " + quote(data_name))
wenzelm@65786
   223
wenzelm@65764
   224
      val dir = target_dir + Path.basic(clean_name(data_name))
wenzelm@65736
   225
      Isabelle_System.mkdirs(dir)
wenzelm@65736
   226
wenzelm@65764
   227
      val session_plots =
wenzelm@65764
   228
        Par_List.map((session: Session) =>
wenzelm@65764
   229
          Isabelle_System.with_tmp_file(session.name, "data") { data_file =>
wenzelm@65764
   230
            Isabelle_System.with_tmp_file(session.name, "gnuplot") { gnuplot_file =>
wenzelm@63706
   231
wenzelm@65764
   232
              File.write(data_file,
wenzelm@65764
   233
                cat_lines(
wenzelm@65764
   234
                  session.entries.map(entry =>
wenzelm@65796
   235
                    List(entry.pull_date.unix_epoch.toString,
wenzelm@65764
   236
                      entry.timing.elapsed.minutes,
wenzelm@65764
   237
                      entry.timing.resources.minutes,
wenzelm@65764
   238
                      entry.ml_timing.elapsed.minutes,
wenzelm@65769
   239
                      entry.ml_timing.resources.minutes,
wenzelm@65769
   240
                      (entry.heap_size.toDouble / (1024 * 1024)).toString).mkString(" "))))
wenzelm@65736
   241
wenzelm@65764
   242
              val max_time =
wenzelm@65764
   243
                ((0.0 /: session.entries){ case (m, entry) =>
wenzelm@65764
   244
                  m.max(entry.timing.elapsed.minutes).
wenzelm@65764
   245
                    max(entry.timing.resources.minutes).
wenzelm@65764
   246
                    max(entry.ml_timing.elapsed.minutes).
wenzelm@65764
   247
                    max(entry.ml_timing.resources.minutes) } max 0.1) * 1.1
wenzelm@65769
   248
              val timing_range = "[0:" + max_time + "]"
wenzelm@65763
   249
wenzelm@65769
   250
              def gnuplot(plots: List[String], kind: String, range: String): String =
wenzelm@65764
   251
              {
wenzelm@65764
   252
                val plot_name = session.name + "_" + kind + ".png"
wenzelm@65764
   253
wenzelm@65764
   254
                File.write(gnuplot_file, """
wenzelm@65799
   255
set terminal png size """ + image_width + "," + image_height + """
wenzelm@65764
   256
set output """ + quote(File.standard_path(dir + Path.basic(plot_name))) + """
wenzelm@65759
   257
set xdata time
wenzelm@65759
   258
set timefmt "%s"
wenzelm@65759
   259
set format x "%d-%b"
wenzelm@65762
   260
set xlabel """ + quote(session.name) + """ noenhanced
wenzelm@65763
   261
set key left bottom
wenzelm@65769
   262
plot [] """ + range + " " +
wenzelm@65769
   263
                plots.map(s => quote(data_file.implode) + " " + s).mkString(", ") + "\n")
wenzelm@65759
   264
wenzelm@65764
   265
                val result =
wenzelm@65764
   266
                  Isabelle_System.bash("\"$ISABELLE_GNUPLOT\" " + File.bash_path(gnuplot_file))
wenzelm@65764
   267
                if (!result.ok)
wenzelm@65764
   268
                  result.error("Gnuplot failed for " + data_name + "/" + plot_name).check
wenzelm@65764
   269
wenzelm@65764
   270
                plot_name
wenzelm@65764
   271
              }
wenzelm@65759
   272
wenzelm@65765
   273
              val timing_plots =
wenzelm@65769
   274
              {
wenzelm@65769
   275
                val plots1 =
wenzelm@65769
   276
                  List(
wenzelm@65769
   277
                    """ using 1:2 smooth sbezier title "elapsed time (smooth)" """,
wenzelm@65769
   278
                    """ using 1:2 smooth csplines title "elapsed time" """)
wenzelm@65769
   279
                val plots2 =
wenzelm@65769
   280
                  List(
wenzelm@65769
   281
                    """ using 1:3 smooth sbezier title "cpu time (smooth)" """,
wenzelm@65769
   282
                    """ using 1:3 smooth csplines title "cpu time" """)
wenzelm@65769
   283
                if (session.threads == 1) plots1 else plots1 ::: plots2
wenzelm@65769
   284
              }
wenzelm@65765
   285
wenzelm@65764
   286
              val ml_timing_plots =
wenzelm@65764
   287
                List(
wenzelm@65765
   288
                  """ using 1:4 smooth sbezier title "ML elapsed time (smooth)" """,
wenzelm@65765
   289
                  """ using 1:4 smooth csplines title "ML elapsed time" """,
wenzelm@65764
   290
                  """ using 1:5 smooth sbezier title "ML cpu time (smooth)" """,
wenzelm@65765
   291
                  """ using 1:5 smooth csplines title "ML cpu time" """)
wenzelm@65736
   292
wenzelm@65769
   293
              val heap_plots =
wenzelm@65769
   294
                List(
wenzelm@65769
   295
                  """ using 1:6 smooth sbezier title "heap (smooth)" """,
wenzelm@65769
   296
                  """ using 1:6 smooth csplines title "heap" """)
wenzelm@65769
   297
wenzelm@65769
   298
              val plot_names =
wenzelm@65847
   299
                (if (session.check_timing)
wenzelm@65847
   300
                  List(
wenzelm@65847
   301
                    gnuplot(timing_plots, "timing", timing_range),
wenzelm@65847
   302
                    gnuplot(ml_timing_plots, "ml_timing", timing_range))
wenzelm@65847
   303
                 else Nil) :::
wenzelm@65769
   304
                (if (session.check_heap) List(gnuplot(heap_plots, "heap", "[0:]")) else Nil)
wenzelm@65769
   305
wenzelm@65769
   306
              session.name -> plot_names
wenzelm@65764
   307
            }
wenzelm@65792
   308
          }, data_entry.sessions).toMap
wenzelm@65754
   309
wenzelm@65838
   310
      HTML.write_document(dir, "index.html",
wenzelm@65838
   311
        List(HTML.title("Isabelle build status for " + data_name)),
wenzelm@65838
   312
        HTML.chapter("Isabelle build status for " + data_name) ::
wenzelm@65838
   313
        HTML.par(
wenzelm@65838
   314
          List(HTML.description(
wenzelm@65754
   315
            List(
wenzelm@65838
   316
              HTML.text("status date:") -> HTML.text(data.date.toString),
wenzelm@65838
   317
              HTML.text("build host:") -> HTML.text(commas(data_entry.hosts)))))) ::
wenzelm@65838
   318
        HTML.par(
wenzelm@65838
   319
          List(HTML.itemize(
wenzelm@65838
   320
            data_entry.sessions.map(session =>
wenzelm@65838
   321
              HTML.link("#session_" + session.name, HTML.text(session.name)) ::
wenzelm@65838
   322
              HTML.text(" (" + session.timing.message_resources + ")"))))) ::
wenzelm@65838
   323
        data_entry.sessions.flatMap(session =>
wenzelm@65838
   324
          List(
wenzelm@65838
   325
            HTML.section(session.name) + HTML.id("session_" + session.name),
wenzelm@65838
   326
            HTML.par(
wenzelm@65838
   327
              HTML.description(
wenzelm@65838
   328
                List(
wenzelm@65838
   329
                  HTML.text("timing:") -> HTML.text(session.timing.message_resources),
wenzelm@65838
   330
                  HTML.text("ML timing:") -> HTML.text(session.ml_timing.message_resources)) :::
wenzelm@65838
   331
                proper_string(session.isabelle_version).map(s =>
wenzelm@65838
   332
                  HTML.text("Isabelle version:") -> HTML.text(s)).toList :::
wenzelm@65838
   333
                proper_string(session.afp_version).map(s =>
wenzelm@65838
   334
                  HTML.text("AFP version:") -> HTML.text(s)).toList) ::
wenzelm@65838
   335
              session_plots.getOrElse(session.name, Nil).map(plot_name =>
wenzelm@65838
   336
                HTML.image(plot_name) +
wenzelm@65838
   337
                  HTML.width(image_width / 2) +
wenzelm@65838
   338
                  HTML.height(image_height / 2))))))
wenzelm@63688
   339
    }
wenzelm@63688
   340
  }
wenzelm@63688
   341
wenzelm@63688
   342
wenzelm@63688
   343
  /* Isabelle tool wrapper */
wenzelm@63688
   344
wenzelm@63688
   345
  val isabelle_tool =
wenzelm@65743
   346
    Isabelle_Tool("build_status", "present recent build status information from database", args =>
wenzelm@63688
   347
    {
wenzelm@65736
   348
      var target_dir = default_target_dir
wenzelm@65736
   349
      var only_sessions = Set.empty[String]
wenzelm@65736
   350
      var options = Options.init()
wenzelm@65736
   351
      var image_size = default_image_size
wenzelm@65750
   352
      var verbose = false
wenzelm@63688
   353
wenzelm@63688
   354
      val getopts = Getopts("""
wenzelm@65743
   355
Usage: isabelle build_status [OPTIONS]
wenzelm@63688
   356
wenzelm@63688
   357
  Options are:
wenzelm@65737
   358
    -D DIR       target directory (default """ + default_target_dir + """)
wenzelm@63700
   359
    -S SESSIONS  only given SESSIONS (comma separated)
wenzelm@65736
   360
    -o OPTION    override Isabelle system OPTION (via NAME=VAL or NAME)
wenzelm@65737
   361
    -s WxH       size of PNG image (default """ + image_size._1 + "x" + image_size._2 + """)
wenzelm@65750
   362
    -v           verbose
wenzelm@63688
   363
wenzelm@65736
   364
  Present performance statistics from build log database, which is specified
wenzelm@65782
   365
  via system options build_log_database_host, build_log_database_user,
wenzelm@65782
   366
  build_log_history etc.
wenzelm@63688
   367
""",
wenzelm@63688
   368
        "D:" -> (arg => target_dir = Path.explode(arg)),
wenzelm@63700
   369
        "S:" -> (arg => only_sessions = space_explode(',', arg).toSet),
wenzelm@65736
   370
        "o:" -> (arg => options = options + arg),
wenzelm@63700
   371
        "s:" -> (arg =>
wenzelm@63805
   372
          space_explode('x', arg).map(Value.Int.parse(_)) match {
wenzelm@65736
   373
            case List(w, h) if w > 0 && h > 0 => image_size = (w, h)
wenzelm@63700
   374
            case _ => error("Error bad PNG image size: " + quote(arg))
wenzelm@65750
   375
          }),
wenzelm@65750
   376
        "v" -> (_ => verbose = true))
wenzelm@63688
   377
wenzelm@65736
   378
      val more_args = getopts(args)
wenzelm@65736
   379
      if (more_args.nonEmpty) getopts.usage()
wenzelm@63700
   380
wenzelm@65736
   381
      val progress = new Console_Progress
wenzelm@63688
   382
wenzelm@65785
   383
      build_status(options, progress = progress, only_sessions = only_sessions, verbose = verbose,
wenzelm@65785
   384
        target_dir = target_dir, image_size = image_size)
wenzelm@65736
   385
wenzelm@64161
   386
  }, admin = true)
wenzelm@63686
   387
}