Mercurial > repos > icfp2013
changeset 44:e795f7179456
Print some timestamps of request times in solver
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 11 Aug 2013 02:16:44 -0700 |
parents | 96b2fcb746bf |
children | b90ccee0bace |
files | src/solver.tp |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/solver.tp Sun Aug 11 02:16:14 2013 -0700 +++ b/src/solver.tp Sun Aug 11 02:16:44 2013 -0700 @@ -138,8 +138,11 @@ } solve:withAuth:andInfo:andProg <- :progId :authKey :info :prog { + start <- os time resp <- (requests evalId: progId (info allInputs)) sendWithKey: authKey + end <- os time if: (resp status) = "ok" { + print: "Start: " . (string: start) . ", End: " . (string: start) . "Duration: " . (string: end - start) matches <- info findMatches: (resp outputs) at: 0 noSuccess <- true cur <- 0 @@ -149,7 +152,10 @@ } while: { noSuccess && cur < (matches length) } do: { prog root!: (matches get: cur) + gstart <- os time gresp <- (requests guess: progId (string: prog)) sendWithKey: authKey + gend <- os time + print: "Start: " . (string: gstart) . ", End: " . (string: gend) . "Duration: " . (string: gend - gstart) if: (gresp status) = "win" { noSuccess <- false } else: {