Avoid diangostics time in performance report
Previously we would include all of the time taken to generate the
performance report in the reported time.  Now we record the time before
we generate plots and use that instead.
@@ -5010,6 +5010,7 @@ class Scheduler(ServerNode):
return {"counts": counts, "keys": keys}
async def performance_report(self, comm=None, start=None, code=""):
+ stop = time()
# Profiles
compute, scheduler, workers = await asyncio.gather(
*[
@@ -5071,7 +5072,7 @@ class Scheduler(ServerNode):
{code}
</pre>
""".format(
- time=format_time(time() - start),
+ time=format_time(stop - start),
address=self.address,
nworkers=len(self.workers),
threads=sum(w.nthreads for w in self.workers.values()),
