Results refresher: the server reruns the whole-program check of main (hourly at most, when HEAD moves) and the emulator over the readable set (12-hourly at most, 01:00-06:00, when HEAD moves), so the Logbook's exact and verified tiers stop going stale
- harbor/results_refresh.py, a server thread: one run at a time at idle priority into a .partial file that replaces [reverse] match_results / diffrun_results only when complete (readable.txt beside it from the emulator's printout); the match run holds re_match_program's ltcg-main.lock and waits while another build of main has it - [logbook] results_refresh, match_every_minutes, behaviour_every_hours, behaviour_window; state in the logbook folder's results.json (per job: commit, start, finish, counts, error; a run in progress), so a restarted server neither repeats a run nor starts one beside a run its predecessor left going, and adopts that run's output - harbor logbook results shows the schedule; --job match|behaviour asks the server for a run now - progress view: "Exact and verified as of commit abc1234, 2 hours ago" under the bars, a run in progress and a failed last run
This commit is contained in:
1 parent
d5eb82261e
commit
a67462f8ca
6 files changed
+640
-3
No files matched your search
+14
-1
@@ -263,12 +263,14 @@ def build_parser():
|
||||
p.add_argument("--count", type=int, default=16)
|
||||
p.add_argument("--as", dest="as_type", default="hex", choices=["hex", "int32", "uint32", "float", "double", "string"])
|
||||
p = sub.add_parser("logbook", help="the project Logbook: add a log entry, set statistics, the chart or a milestone")
|
||||
p.add_argument("action", choices=["add", "stats", "map", "milestone", "show", "import", "refresh"])
|
||||
p.add_argument("action", choices=["add", "stats", "map", "milestone", "show", "import", "refresh", "results"])
|
||||
p.add_argument("--title")
|
||||
p.add_argument("--kind", default="note")
|
||||
p.add_argument("--detail", help="the entry text (or --file)")
|
||||
p.add_argument("--file", help="a text file (add) or a JSON file (stats, map, milestone) or an export folder (import)")
|
||||
p.add_argument("--no-history", action="store_true", help="stats: do not add a trend point")
|
||||
p.add_argument("--job", choices=["match", "behaviour"],
|
||||
help="results: ask the server for this run (whole-program check or emulator) now")
|
||||
p = sub.add_parser("next-functions", help="functions in your bands to decompile next, easiest first")
|
||||
p.add_argument("-n", type=int, default=10)
|
||||
p = sub.add_parser("defer", help="set a function aside with a reason and evidence")
|
||||
@@ -757,6 +759,17 @@ def main(argv=None):
|
||||
from . import logbook_auto
|
||||
res = logbook_auto.refresh(project, force=True)
|
||||
out(res, json.dumps(res))
|
||||
elif args.action == "results":
|
||||
from . import results_refresh
|
||||
if args.job:
|
||||
if who() not in harbor.coordinators:
|
||||
raise HarborError("the Logbook is written by a coordinator")
|
||||
res = results_refresh.request(project, args.job)
|
||||
out(res, f"asked the Harbor server for a {args.job} run; it starts within two minutes "
|
||||
"(after any run in progress)")
|
||||
else:
|
||||
res = results_refresh.status(project)
|
||||
out(res, json.dumps(res, indent=1))
|
||||
elif args.action == "import":
|
||||
res = logbook.import_export(project, args.file)
|
||||
out(res, json.dumps(res))
|
||||
|
||||
Reference in new issue
Block a user