summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Chen <luke.chen@mongodb.com>2021-11-02 18:34:45 +1100
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-11-02 07:59:03 +0000
commit2d5a16adde2b17c851675c6a95f84afa33347cd1 (patch)
tree636f2544c2f37a5b1d1c278d5084c6aa619ec653
parent50133700133b890e69e002c71ea1d078c066f497 (diff)
downloadmongo-2d5a16adde2b17c851675c6a95f84afa33347cd1.tar.gz
Import wiredtiger: a5581e759002efc42ac455c3e0a3b8cc58cf569a from branch mongodb-master
ref: c531995c03..a5581e7590 for: 5.2.0 WT-5010 Migrate Jenkins “wiredtiger-perf-checkpoint” job to Evergreen
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/runners/update-btree.json8
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/runners/update-checkpoint.json15
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/perf_stat_collection.py10
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_config.py4
-rw-r--r--src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_run.py28
-rw-r--r--src/third_party/wiredtiger/import.data2
-rwxr-xr-xsrc/third_party/wiredtiger/test/evergreen.yml32
7 files changed, 76 insertions, 23 deletions
diff --git a/src/third_party/wiredtiger/bench/wtperf/runners/update-btree.json b/src/third_party/wiredtiger/bench/wtperf/runners/update-btree.json
index 950166d76e5..5ee8af5559e 100644
--- a/src/third_party/wiredtiger/bench/wtperf/runners/update-btree.json
+++ b/src/third_party/wiredtiger/bench/wtperf/runners/update-btree.json
@@ -1,14 +1,14 @@
[
{
"argument": "-o threads=((count=2,inserts=1,throttle=20000),(count=2,reads=1),(count=2,updates=1,throttle=20000))",
- "operation": "read"
+ "operations": [ "read", "load" ]
},
{
"argument": "-o threads=((count=2,inserts=1,throttle=20000),(count=2,reads=1,throttle=20000),(count=2,updates=1))",
- "operation": "update"
+ "operations": [ "update" ]
},
{
"argument": "-o threads=((count=2,inserts=1),(count=2,reads=1,throttle=20000),(count=2,updates=1,throttle=20000))",
- "operation": "insert"
+ "operations": [ "insert" ]
}
- ]
+]
diff --git a/src/third_party/wiredtiger/bench/wtperf/runners/update-checkpoint.json b/src/third_party/wiredtiger/bench/wtperf/runners/update-checkpoint.json
new file mode 100644
index 00000000000..8779baa5c1b
--- /dev/null
+++ b/src/third_party/wiredtiger/bench/wtperf/runners/update-checkpoint.json
@@ -0,0 +1,15 @@
+[
+ {
+ "argument": "-o threads=((count=1,inserts=1,throttle=20000),(count=2,reads=1),(count=2,updates=1,throttle=20000))",
+ "operations": [ "read", "load" ]
+ },
+ {
+ "argument": "-o threads=((count=1,inserts=1,throttle=20000),(count=2,reads=1,throttle=20000),(count=2,updates=1))",
+ "operations": [ "update" ]
+ },
+ {
+ "argument": "-o threads=((count=1,inserts=1),(count=2,reads=1,throttle=20000),(count=2,updates=1,throttle=20000))",
+ "operations": [ "insert" ]
+ }
+]
+
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/perf_stat_collection.py b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/perf_stat_collection.py
index dd940ce88e1..e08bd57d72b 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/perf_stat_collection.py
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/perf_stat_collection.py
@@ -29,6 +29,8 @@
# OTHER DEALINGS IN THE SOFTWARE.
import re
+from typing import List
+
from perf_stat import PerfStat
@@ -47,12 +49,12 @@ class PerfStatCollection:
def add_stat(self, perf_stat: PerfStat):
self.perf_stats[perf_stat.short_label] = perf_stat
- def find_stats(self, test_stat_path: str, operation: str):
+ def find_stats(self, test_stat_path: str, operations: List[str]):
for stat in self.perf_stats.values():
- if operation is None or stat.short_label == operation:
+ if not operations or stat.short_label in operations:
value = find_stat(test_stat_path=test_stat_path,
- pattern=stat.pattern,
- position_of_value=stat.input_offset)
+ pattern=stat.pattern,
+ position_of_value=stat.input_offset)
stat.add_value(value=value)
def to_value_list(self, brief: bool):
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_config.py b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_config.py
index 4d210a572b7..a440b36449f 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_config.py
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_config.py
@@ -38,7 +38,9 @@ class WTPerfConfig:
run_max: int = 1,
verbose: bool = False,
git_root: str = None,
- json_info: dict = {}):
+ json_info=None):
+ if json_info is None:
+ json_info = {}
self.wtperf_path: str = wtperf_path
self.home_dir: str = home_dir
self.test: str = test
diff --git a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_run.py b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_run.py
index 015dc0881f9..bcb5db43df3 100644
--- a/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_run.py
+++ b/src/third_party/wiredtiger/bench/wtperf/wtperf_run_py/wtperf_run.py
@@ -38,6 +38,7 @@ import platform
import psutil
from pygit2 import discover_repository, Repository
from pygit2 import GIT_SORT_TOPOLOGICAL, GIT_SORT_REVERSE, GIT_SORT_NONE
+from typing import List
from wtperf_config import WTPerfConfig
from perf_stat import PerfStat
@@ -48,10 +49,11 @@ from perf_stat_collection import PerfStatCollection
test_stats_file = 'test.stat'
-def create_test_home_path(home: str, test_run: int, operation: str):
+def create_test_home_path(home: str, test_run: int, operations: List[str] = None):
home_path = "{}_{}".format(home, test_run)
- if operation is not None:
- home_path += "_{}".format(operation)
+ if operations:
+ # Use the first operation name as part of the home path
+ home_path += "_{}".format(operations[0])
return home_path
@@ -139,15 +141,15 @@ def detailed_perf_stats(config: WTPerfConfig, perf_stats: PerfStatCollection):
return as_dict
-def run_test_wrapper(config: WTPerfConfig, operation: str=None, argument: str=None):
+def run_test_wrapper(config: WTPerfConfig, operations: List[str] = None, argument: str = None):
for test_run in range(config.run_max):
print("Starting test {}".format(test_run))
- run_test(config=config, test_run=test_run, operation=operation, argument=argument)
+ run_test(config=config, test_run=test_run, operations=operations, argument=argument)
print("Completed test {}".format(test_run))
-def run_test(config: WTPerfConfig, test_run: int, operation: str, argument:str):
- test_home = create_test_home_path(home=config.home_dir, test_run=test_run, operation=operation)
+def run_test(config: WTPerfConfig, test_run: int, operations: List[str] = None, argument: str = None):
+ test_home = create_test_home_path(home=config.home_dir, test_run=test_run, operations=operations)
command_line = construct_wtperf_command_line(
wtperf=config.wtperf_path,
env=config.environment,
@@ -157,13 +159,13 @@ def run_test(config: WTPerfConfig, test_run: int, operation: str, argument:str):
subprocess.run(command_line)
-def process_results(config: WTPerfConfig, perf_stats: PerfStatCollection, operation: str=None):
+def process_results(config: WTPerfConfig, perf_stats: PerfStatCollection, operations: List[str] = None):
for test_run in range(config.run_max):
- test_home = create_test_home_path(home=config.home_dir, test_run=test_run, operation=operation)
+ test_home = create_test_home_path(home=config.home_dir, test_run=test_run, operations=operations)
test_stats_path = create_test_stat_path(test_home)
if config.verbose:
print('Reading test stats file: {}'.format(test_stats_path))
- perf_stats.find_stats(test_stat_path=test_stats_path, operation=operation)
+ perf_stats.find_stats(test_stat_path=test_stats_path, operations=operations)
def setup_perf_stats():
@@ -266,8 +268,8 @@ def main():
if config.arg_file:
for content in arg_file_contents:
if args.verbose:
- print("Argument: {}, Operation: {}".format(content["argument"], content["operation"]))
- run_test_wrapper(config=config, operation=content["operation"], argument=content["argument"])
+ print("Argument: {}, Operation: {}".format(content["argument"], content["operations"]))
+ run_test_wrapper(config=config, operations=content["operations"], argument=content["argument"])
else:
run_test_wrapper(config=config)
@@ -278,7 +280,7 @@ def main():
# Process result
if config.arg_file:
for content in arg_file_contents:
- process_results(config, perf_stats, operation=content["operation"])
+ process_results(config, perf_stats, operations=content["operations"])
else:
process_results(config, perf_stats)
diff --git a/src/third_party/wiredtiger/import.data b/src/third_party/wiredtiger/import.data
index 7a4f7f69b4f..c679fd263e1 100644
--- a/src/third_party/wiredtiger/import.data
+++ b/src/third_party/wiredtiger/import.data
@@ -2,5 +2,5 @@
"vendor": "wiredtiger",
"github": "wiredtiger/wiredtiger.git",
"branch": "mongodb-master",
- "commit": "c531995c033470668561a895e7be2757c507eafe"
+ "commit": "a5581e759002efc42ac455c3e0a3b8cc58cf569a"
}
diff --git a/src/third_party/wiredtiger/test/evergreen.yml b/src/third_party/wiredtiger/test/evergreen.yml
index 689e7dc9c31..1dbb6b726cf 100755
--- a/src/third_party/wiredtiger/test/evergreen.yml
+++ b/src/third_party/wiredtiger/test/evergreen.yml
@@ -3139,6 +3139,34 @@ tasks:
perf-test-name: modify-force-update-large-record-btree
maxruns: 3
+ #########################################
+ # Performance Tests for perf-checkpoint #
+ #########################################
+
+ - name: perf-test-update-checkpoint-btree
+ tags: ["perf-checkpoint"]
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "generic-perf-test"
+ vars:
+ perf-test-name: update-checkpoint-btree
+ maxruns: 1
+ wtarg: "-a ../runners/update-checkpoint.json"
+
+ - name: perf-test-update-checkpoint-lsm
+ tags: ["perf-checkpoint"]
+ depends_on:
+ - name: compile
+ commands:
+ - func: "fetch artifacts"
+ - func: "generic-perf-test"
+ vars:
+ perf-test-name: update-checkpoint-lsm
+ maxruns: 1
+ wtarg: "-a ../runners/update-checkpoint.json"
+
#######################################
# Buildvariants #
#######################################
@@ -3419,6 +3447,7 @@ buildvariants:
- name: compile
- name: ".btree-perf"
- name: ".lsm-perf"
+ - name: ".perf-checkpoint"
display_tasks:
- name: Wiredtiger-perf-btree-jobs
execution_tasks:
@@ -3426,6 +3455,9 @@ buildvariants:
- name: Wiredtiger-perf-lsm-jobs
execution_tasks:
- ".lsm-perf"
+ - name: Wiredtiger-perf-checkpoint-jobs
+ execution_tasks:
+ - ".perf-checkpoint"
- name: large-scale-tests
display_name: "Large scale tests"