local user_home for improved performance, but only after given changeset for stability of measurement history;
authorwenzelm
Sat Nov 11 19:23:52 2017 +0100 (9 months ago)
changeset 67048ec438988b65a
parent 67047 19b6091c2137
child 67049 0bb8369d10d6
local user_home for improved performance, but only after given changeset for stability of measurement history;
src/Pure/Admin/isabelle_cronjob.scala
     1.1 --- a/src/Pure/Admin/isabelle_cronjob.scala	Sat Nov 11 17:04:14 2017 +0100
     1.2 +++ b/src/Pure/Admin/isabelle_cronjob.scala	Sat Nov 11 19:23:52 2017 +0100
     1.3 @@ -264,7 +264,7 @@
     1.4            detect = Build_Log.Prop.build_tags + " = " + SQL.string("AFP"))))
     1.5  
     1.6    private def remote_build_history(
     1.7 -    rev: String, afp_rev: Option[String], i: Int, r: Remote_Build): Logger_Task =
     1.8 +    rev: String, afp_rev: Option[String], i: Int, user_home: Boolean, r: Remote_Build): Logger_Task =
     1.9    {
    1.10      val task_name = "build_history-" + r.host
    1.11      Logger_Task(task_name, logger =>
    1.12 @@ -285,6 +285,7 @@
    1.13                    rev = rev,
    1.14                    afp_rev = afp_rev,
    1.15                    options =
    1.16 +                    (if (user_home && r.shared_home) " -u /tmp/isabelle-isatest" else "") +
    1.17                      " -N " + Bash.string(task_name) + (if (i < 0) "" else "_" + (i + 1).toString) +
    1.18                      " -f " + r.options,
    1.19                    args = "-o timeout=10800 " + r.args)
    1.20 @@ -438,7 +439,9 @@
    1.21  
    1.22      val hg = Mercurial.repository(isabelle_repos)
    1.23      val hg_graph = hg.graph()
    1.24 -    val rev = hg.id()
    1.25 +
    1.26 +    val user_home: String => Boolean =
    1.27 +      hg_graph.all_succs(List("19b6091c2137")).contains(_)
    1.28  
    1.29      def history_base_filter(r: Remote_Build): Item => Boolean =
    1.30      {
    1.31 @@ -463,8 +466,8 @@
    1.32                    SEQ(
    1.33                      for {
    1.34                        (r, i) <- (if (seq.length <= 1) seq.map((_, -1)) else seq.zipWithIndex)
    1.35 -                      (isabelle_rev, afp_rev) <- r.pick(logger.options, rev, history_base_filter(r))
    1.36 -                    } yield remote_build_history(isabelle_rev, afp_rev, i, r)))),
    1.37 +                      (rev, afp_rev) <- r.pick(logger.options, hg.id(), history_base_filter(r))
    1.38 +                    } yield remote_build_history(rev, afp_rev, i, user_home(rev), r)))),
    1.39                  Logger_Task("jenkins_logs", _ =>
    1.40                    Jenkins.download_logs(Jenkins.build_log_jobs, main_dir)),
    1.41                  Logger_Task("build_log_database",