diff options
author | Alexander Ignatyev <alexander.ignatyev@mongodb.com> | 2022-11-11 11:38:41 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-11-11 12:20:20 +0000 |
commit | ea088bcf555050361ef313edf402025dd37788c2 (patch) | |
tree | 2f24431f747ee5edc5bf75c3a5fd01386ef69174 /buildscripts/cost_model/workload_execution.py | |
parent | dd6c21b4f7c6d32161a0c262dbd63a8c86b2a44d (diff) | |
download | mongo-ea088bcf555050361ef313edf402025dd37788c2.tar.gz |
SERVER-71220 Apply additional filters when calibrating Cost Model
Diffstat (limited to 'buildscripts/cost_model/workload_execution.py')
-rw-r--r-- | buildscripts/cost_model/workload_execution.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/buildscripts/cost_model/workload_execution.py b/buildscripts/cost_model/workload_execution.py index d27bbdea330..76850a0d3b5 100644 --- a/buildscripts/cost_model/workload_execution.py +++ b/buildscripts/cost_model/workload_execution.py @@ -46,6 +46,7 @@ class Query: pipeline: Pipeline keys_length_in_bytes: int = 0 number_of_fields: int = 0 + note: any = None @dataclass @@ -54,6 +55,7 @@ class QueryParameters: keys_length_in_bytes: int average_document_size_in_bytes: float + note: any number_of_fields: int = 0 def to_json(self) -> str: @@ -114,7 +116,7 @@ class WorkloadExecution: avg_doc_size = await self.database.get_average_document_size(coll_info.name) parameters = QueryParameters(keys_length_in_bytes=query.keys_length_in_bytes, number_of_fields=query.number_of_fields, - average_document_size_in_bytes=avg_doc_size) + average_document_size_in_bytes=avg_doc_size, note=query.note) for _ in range(self.config.runs): explain = await self.database.explain(coll_info.name, query.pipeline) if explain['ok'] == 1: |