diff options
author | Sam Kleinman <samk@10gen.com> | 2016-08-02 12:32:47 -0400 |
---|---|---|
committer | Sam Kleinman <samk@10gen.com> | 2016-08-02 14:59:28 -0400 |
commit | a78e1fefe2cf7fa9c537ec36295e5371e2458d2d (patch) | |
tree | 560a556917e3cf16f64ef3c03e78cff8b712e88a /etc | |
parent | f8c4d2025431d83cda24c1a193321952372674c7 (diff) | |
download | mongo-a78e1fefe2cf7fa9c537ec36295e5371e2458d2d.tar.gz |
SERVER-25395: use scons cache for perf projects
Diffstat (limited to 'etc')
-rw-r--r-- | etc/distributed_correctness.yml | 43 | ||||
-rw-r--r-- | etc/longevity.yml | 46 | ||||
-rw-r--r-- | etc/system_perf.yml | 54 |
3 files changed, 122 insertions, 21 deletions
diff --git a/etc/distributed_correctness.yml b/etc/distributed_correctness.yml index ccd172ec615..fe191191074 100644 --- a/etc/distributed_correctness.yml +++ b/etc/distributed_correctness.yml @@ -18,6 +18,17 @@ post: set -v cd ./clusters/${cluster} if [ ! -f "test.success" ]; then yes yes | ./terraform destroy; fi + - command: shell.exec + params: + working_dir: src + script: | + # removes files from the (local) scons cache when it's over a + # threshold, to the $prune_ratio percentage. Ideally override + # these default values in the distro config in evergreen. + + if [ -d "${scons_cache_path}" ]; then + ${python|python} buildscripts/scons_cache_prune.py --cache-dir ${scons_cache_path} --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} + fi functions: "prepare environment": @@ -216,16 +227,37 @@ tasks: - command: git.get_project params: directory: src - - command: git.apply_patch + - command: shell.exec params: - directory: src + working_dir: src + script: | + set -o errexit + set -o verbose + + # We get the raw version string (r1.2.3-45-gabcdef) from git + MONGO_VERSION=$(git describe) + # If this is a patch build, we add the patch version id to the version string so we know + # this build was a patch, and which evergreen task it came from + if [ "${is_patch|}" = "true" ]; then + MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" + fi + + # This script converts the generated version string into a sanitized version string for + # use by scons and uploading artifacts as well as information about for the scons cache. + echo $MONGO_VERSION | USE_SCONS_CACHE=${use_scons_cache|false} ${python|python} buildscripts/generate_compile_expansions.py | tee compile_expansions.yml + # Then we load the generated version data into the agent so we can use it in task definitions + - command: expansions.update + params: + file: src/compile_expansions.yml - command: shell.exec params: working_dir: src script: | set -o errexit - set -v - ${scons|scons} ${compile_flags|} core + set -o verbose + + ${python|python} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} core + mkdir -p mongodb/bin strip mongo strip mongod @@ -328,9 +360,10 @@ buildvariants: - dsi - workloads expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: standalone cluster: single-correctness + use_scons_cache: true run_on: - "rhel70-perf-standalone" tasks: diff --git a/etc/longevity.yml b/etc/longevity.yml index 697d523e2ef..946568e5f9a 100644 --- a/etc/longevity.yml +++ b/etc/longevity.yml @@ -20,6 +20,17 @@ post: yes yes | ./terraform destroy yes yes | ./terraform destroy echo "Cluster DESTROYED." + - command: shell.exec + params: + working_dir: src + script: | + # removes files from the (local) scons cache when it's over a + # threshold, to the $prune_ratio percentage. Ideally override + # these default values in the distro config in evergreen. + + if [ -d "${scons_cache_path}" ]; then + ${python|python} buildscripts/scons_cache_prune.py --cache-dir ${scons_cache_path} --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} + fi functions: "prepare environment": @@ -219,16 +230,37 @@ tasks: - command: git.get_project params: directory: src - - command: git.apply_patch + - command: shell.exec params: - directory: src + working_dir: src + script: | + set -o errexit + set -o verbose + + # We get the raw version string (r1.2.3-45-gabcdef) from git + MONGO_VERSION=$(git describe) + # If this is a patch build, we add the patch version id to the version string so we know + # this build was a patch, and which evergreen task it came from + if [ "${is_patch|}" = "true" ]; then + MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" + fi + + # This script converts the generated version string into a sanitized version string for + # use by scons and uploading artifacts as well as information about for the scons cache. + echo $MONGO_VERSION | USE_SCONS_CACHE=${use_scons_cache|false} ${python|python} buildscripts/generate_compile_expansions.py | tee compile_expansions.yml + # Then we load the generated version data into the agent so we can use it in task definitions + - command: expansions.update + params: + file: src/compile_expansions.yml - command: shell.exec params: working_dir: src script: | set -o errexit set -o verbose - ${scons|scons} ${compile_flags|} mongo mongod mongos + + ${python|python} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} mongo mongod mongos + # strip binaries here strip mongo strip mongos @@ -315,12 +347,12 @@ buildvariants: - dsi - YCSB expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: shard cluster: longevity numShard: 3 storageEngine: wiredTiger - + use_scons_cache: true run_on: - "rhel70-perf-longevity" tasks: @@ -334,12 +366,12 @@ buildvariants: batchtime: 40320 # 4 week modules: *modules expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: shard cluster: longevity numShard: 3 storageEngine: mmapv1 - + use_scons_cache: true run_on: - "rhel70-perf-longevity" tasks: diff --git a/etc/system_perf.yml b/etc/system_perf.yml index 1c0cb200f1a..b7e0b9aa68e 100644 --- a/etc/system_perf.yml +++ b/etc/system_perf.yml @@ -8,7 +8,17 @@ post: - command: attach.results params: file_location: work/report.json - - command: shell.cleanup + - command: shell.exec + params: + working_dir: src + script: | + # removes files from the (local) scons cache when it's over a + # threshold, to the $prune_ratio percentage. Ideally override + # these default values in the distro config in evergreen. + + if [ -d "${scons_cache_path}" ]; then + ${python|python} buildscripts/scons_cache_prune.py --cache-dir ${scons_cache_path} --cache-size ${scons_cache_size|200} --prune-ratio ${scons_prune_ratio|0.8} + fi functions: "prepare environment": @@ -318,16 +328,35 @@ tasks: - command: git.get_project params: directory: src - - command: git.apply_patch + - command: shell.exec params: - directory: src + working_dir: src + script: | + set -o errexit + set -o verbose + + # We get the raw version string (r1.2.3-45-gabcdef) from git + MONGO_VERSION=$(git describe) + # If this is a patch build, we add the patch version id to the version string so we know + # this build was a patch, and which evergreen task it came from + if [ "${is_patch|}" = "true" ]; then + MONGO_VERSION="$MONGO_VERSION-patch-${version_id}" + fi + + # This script converts the generated version string into a sanitized version string for + # use by scons and uploading artifacts as well as information about for the scons cache. + echo $MONGO_VERSION | USE_SCONS_CACHE=${use_scons_cache|false} ${python|python} buildscripts/generate_compile_expansions.py | tee compile_expansions.yml + # Then we load the generated version data into the agent so we can use it in task definitions + - command: expansions.update + params: + file: src/compile_expansions.yml - command: shell.exec params: working_dir: src script: | set -o errexit set -o verbose - ${scons|scons} ${compile_flags|} mongo${extension} mongod${extension} mongos${extension} + ${python|python} ./buildscripts/scons.py ${compile_flags|} ${scons_cache_args|} mongo${extension} mongod${extension} mongos${extension} MONGO_VERSION=${version} mkdir -p mongodb/bin mv mongo${extension|} mongodb/bin mv mongod${extension|} mongodb/bin @@ -619,10 +648,11 @@ buildvariants: - workloads - YCSB expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: single-replica cluster: single platform: linux + use_scons_cache: true run_on: - "rhel70-perf-single" tasks: @@ -636,10 +666,11 @@ buildvariants: batchtime: 1440 # 24 hours modules: *modules expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: standalone cluster: single platform: linux + use_scons_cache: true run_on: - "rhel70-perf-single" tasks: @@ -656,10 +687,11 @@ buildvariants: batchtime: 1440 # 24 hours modules: *modules expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: shard cluster: shard platform: linux + use_scons_cache: true run_on: - "rhel70-perf-shard" tasks: @@ -673,7 +705,7 @@ buildvariants: batchtime: 1440 # 24 hours modules: *modules expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: replica cluster: replica platform: linux @@ -690,10 +722,11 @@ buildvariants: batchtime: 1440 # 24 hours modules: *modules expansions: - compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy --release + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy setup: replica-2node cluster: replica platform: linux + use_scons_cache: true run_on: - "rhel70-perf-replset" tasks: @@ -705,6 +738,9 @@ buildvariants: display_name: Linux Oplog Compare batchtime: 1440 # 24 hours modules: *modules + expansions: + compile_flags: -j$(grep -c ^processor /proc/cpuinfo) CC=/opt/mongodbtoolchain/v2/bin/gcc CXX=/opt/mongodbtoolchain/v2/bin/g++ OBJCOPY=/opt/mongodbtoolchain/v2/bin/objcopy + use_scons_cache: true run_on: - "rhel70-perf-single" tasks: |