History

perf scripts python: exported-sql-viewer.py: Add LookupModel()

Add LookupModel() to find a model in the model cache without creating it.

Adrian Hunter committed 7 years ago

Commit 181ea401 parent 8bd436b1 file · +9 −0Browse files

Showing the changes to tools/perf/scripts/python (1 of 1 file). Show all

Unified · Split

tools/perf/scripts/python/exported-sql-viewer.py+9−0
@@ -341,6 +341,15 @@ def LookupCreateModel(model_name, create_fn): · 340 unmodified lines
341 model_cache_lock.release()341 model_cache_lock.release()
342 return model342 return model
343 343
344def LookupModel(model_name):
345 model_cache_lock.acquire()
346 try:
347 model = model_cache[model_name]
348 except:
349 model = None
350 model_cache_lock.release()
351 return model
352
344# Find bar353# Find bar
345 354
346class FindBar():355class FindBar():