Index: tools/testrunner/local/perfdata.py |
diff --git a/tools/testrunner/local/perfdata.py b/tools/testrunner/local/perfdata.py |
index 2979dc48661b9b48662a37a0555133b470ee25c3..29ebff773a5dd6a4ca2d31104d5c46910d19aa87 100644 |
--- a/tools/testrunner/local/perfdata.py |
+++ b/tools/testrunner/local/perfdata.py |
@@ -118,3 +118,29 @@ class PerfDataManager(object): |
if not mode in modes: |
modes[mode] = PerfDataStore(self.datadir, arch, mode) |
return modes[mode] |
+ |
+ |
+class NullPerfDataStore(object): |
+ def UpdatePerfData(self, test): |
+ pass |
+ |
+ def FetchPerfData(self, test): |
+ return None |
+ |
+ |
+class NullPerfDataManager(object): |
+ def __init__(self): |
+ pass |
+ |
+ def GetStore(self, *args, **kwargs): |
+ return NullPerfDataStore() |
+ |
+ def close(self): |
+ pass |
+ |
+ |
+def GetPerfDataManager(context, datadir): |
+ if context.use_perf_data: |
+ return PerfDataManager(datadir) |
+ else: |
+ return NullPerfDataManager() |