summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2020-05-12 16:18:20 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-05-13 03:44:02 +0000
commit32673beb9193176de717feb7cd8d37c6b580f32d (patch)
tree59b2d0adb2e787a6cf5d3a93659486745bfa8872
parentd7d6a14d30d8cd5b9ecc9d0bb74a959ab9349b61 (diff)
downloadmongo-32673beb9193176de717feb7cd8d37c6b580f32d.tar.gz
SERVER-48162 tolerate new benchmark report fields
-rw-r--r--buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py b/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py
index ec4b6d53235..6bc5ba22dbf 100644
--- a/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py
+++ b/buildscripts/resmokelib/testing/hooks/combine_benchmark_results.py
@@ -137,7 +137,9 @@ class _BenchmarkThreadsReport(object):
Context = collections.namedtuple("Context", CONTEXT_FIELDS) # type: ignore
def __init__(self, context_dict):
- self.context = self.Context(**context_dict)
+ # `context_dict` was parsed from a json file and might have additional fields.
+ relevant = dict(filter(lambda e: e[0] in self.Context._fields, context_dict.items()))
+ self.context = self.Context(**relevant)
# list of benchmark runs for each thread.
self.thread_benchmark_map = collections.defaultdict(list)