From 3d7ec6cd0035623c625411ebabe024106b497466 Mon Sep 17 00:00:00 2001 From: Mike McCandless Date: Tue, 19 Jan 2021 14:19:04 -0500 Subject: [PATCH] #77: add anchor links to navigate the profiling results --- src/python/benchUtil.py | 2 +- src/python/nightlyBench.py | 25 +++++++++++++++++++------ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/src/python/benchUtil.py b/src/python/benchUtil.py index cd9993b1..c7e80055 100644 --- a/src/python/benchUtil.py +++ b/src/python/benchUtil.py @@ -942,7 +942,7 @@ def makeIndex(self, id, index, printCharts=False, profilerCount=30, profilerStac check = True) output = f'\nProfiler for {mode}:\n{result.stdout.decode("utf-8")}' print(output) - profilerResults.append(output) + profilerResults.append((mode, output)) return fullIndexPath, fullLogFile, profilerResults diff --git a/src/python/nightlyBench.py b/src/python/nightlyBench.py index 9f97c7bd..5e5e66a6 100644 --- a/src/python/nightlyBench.py +++ b/src/python/nightlyBench.py @@ -993,32 +993,45 @@ def run(): w('

') w('\n' % timeStamp) + w('Jump to profiler results:') + w('indexing 1KB cpu, heap, ') + w('indexing 4KB cpu, heap, ') + w('indexing near-real-time cpu, heap, ') + w('deterministic (single threaded) indexing cpu, heap, ') + w('searching cpu, heap') + w('

Profiler results (indexing)

\n') if profilerMediumIndex is not None: w('~1KB docs') - for output in profilerMediumIndex: + for mode, output in profilerMediumIndex: + w(f'') w(f'
{output}
\n') if profilerBigIndex is not None: w('~4KB docs') - for output in profilerBigIndex: + for mode, output in profilerBigIndex: + w(f'') w(f'
{output}
\n') if profilerNRTIndex is not None: w('NRT indexing') - for output in profilerNRTIndex: + for mode, output in profilerNRTIndex: + w(f'') w(f'
{output}
\n') if profilerSearchIndex is not None: w('Deterministic (for search benchmarking) indexing') - for output in profilerSearchIndex: + for mode, output in profilerSearchIndex: + w(f'') w(f'
{output}
\n') w('

Profiler results (searching)

\n') - w('CPU:
') + w(f'') + w('CPU:
') w('
\n')
       w(comp.getAggregateProfilerResult(id, 'cpu', stackSize=12, count=50))
       w('
') w('

') - w('HEAP:
') + w('HEAP:
') + w(f'') w('
\n')
       w(comp.getAggregateProfilerResult(id, 'heap', stackSize=12, count=50))
       w('
')