summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Moody <daniel.moody@mongodb.com>2022-09-15 19:20:20 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-15 21:53:14 +0000
commitba5ad7837a0c11ddd620b5aad9249cd26f48bf89 (patch)
tree2f73da06f1906e1f429f1acf849174f74f28b8b3
parentfc39f3acfa1cdc9e9507267832b4091511656117 (diff)
downloadmongo-ba5ad7837a0c11ddd620b5aad9249cd26f48bf89.tar.gz
SERVER-67060 update static build metrics targets to be correct
-rwxr-xr-xbuildscripts/evergreen_gen_build_metrics_tasks.py25
-rw-r--r--etc/evergreen.yml3
-rw-r--r--evergreen/build_metric_cedar_report.py5
3 files changed, 26 insertions, 7 deletions
diff --git a/buildscripts/evergreen_gen_build_metrics_tasks.py b/buildscripts/evergreen_gen_build_metrics_tasks.py
index ee136229950..c2fe1541404 100755
--- a/buildscripts/evergreen_gen_build_metrics_tasks.py
+++ b/buildscripts/evergreen_gen_build_metrics_tasks.py
@@ -17,7 +17,7 @@ def main():
def create_build_metric_task_steps(task_build_flags, task_targets):
evg_flags = f"--debug=time,count,memory VARIANT_DIR=metrics BUILD_METRICS_EVG_TASK_ID={os.environ['task_id']} BUILD_METRICS_EVG_BUILD_VARIANT={os.environ['build_variant']}"
- cache_flags = "--cache=all --cache-dir=$PWD/scons-cache --cache-signature-mode=validate"
+ cache_flags = "--cache-dir=$PWD/scons-cache --cache-signature-mode=validate"
scons_task_steps = [
f"{evg_flags} --build-metrics=build_metrics.json",
@@ -40,17 +40,23 @@ def main():
#############################
if sys.platform == 'win32':
- targets = "install-all-meta"
- build_flags = ""
+ targets = "install-all-meta-but-not-unittests"
+ build_flags = '--cache=nolinked'
tasks['windows_tasks'].append(
Task("build_metrics_msvc", create_build_metric_task_steps(build_flags, targets)))
##############################
elif sys.platform == 'darwin':
+
for link_model in ['dynamic', 'static']:
- targets = "install-all-meta" + " generate-libdeps-graph" if link_model == 'dynamic' else ""
- build_flags = f"--link-model={link_model} --force-macos-dynamic-link"
+ if link_model == 'dynamic':
+ targets = "install-all-meta generate-libdeps-graph"
+ else:
+ targets = "install-all-meta-but-not-unittests"
+
+ build_flags = f"--link-model={link_model} --force-macos-dynamic-link" + (
+ ' --cache=nolinked' if link_model == 'static' else "")
tasks['macos_tasks'].append(
Task(f"build_metrics_xcode_{link_model}",
@@ -63,8 +69,13 @@ def main():
for compiler in ['gcc']:
for link_model in ['dynamic', 'static']:
- targets = "install-all-meta" + " generate-libdeps-graph" if link_model == 'dynamic' else ""
- build_flags = f"BUILD_METRICS_BLOATY=/opt/mongodbtoolchain/v4/bin/bloaty --variables-files=etc/scons/mongodbtoolchain_{toolchain}_{compiler}.vars --link-model={link_model}"
+ if link_model == 'dynamic':
+ targets = "install-all-meta generate-libdeps-graph"
+ else:
+ targets = "install-all-meta-but-not-unittests"
+
+ build_flags = f"BUILD_METRICS_BLOATY=/opt/mongodbtoolchain/v4/bin/bloaty --variables-files=etc/scons/mongodbtoolchain_{toolchain}_{compiler}.vars --link-model={link_model}" + (
+ ' --cache=nolinked' if link_model == 'static' else "")
tasks['linux_tasks'].append(
Task(f"build_metrics_{toolchain}_{compiler}_{link_model}",
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index 740fbc61c8e..24b3c5ddb20 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1900,6 +1900,7 @@ buildvariants:
compile_flags: --ssl MONGO_DISTMOD=rhel80 -j$(grep -c ^processor /proc/cpuinfo)
repo_edition: enterprise
large_distro_name: rhel80-large
+ num_scons_link_jobs_available: 0.1
tasks:
- name: build_metrics_gen_TG
@@ -1912,6 +1913,7 @@ buildvariants:
run_on:
- macos-1100
expansions:
+ num_scons_link_jobs_available: 0.1
compile_env: DEVELOPER_DIR=/Applications/Xcode13.app
compile_flags: --ssl -j$(sysctl -n hw.logicalcpu) --libc++ --variables-files=etc/scons/xcode_macosx.vars
tasks:
@@ -1924,6 +1926,7 @@ buildvariants:
run_on:
- windows-vsCurrent-small
expansions:
+ num_scons_link_jobs_available: 0.1
compile_flags: CPPPATH="c:/sasl/include" LIBPATH="c:/sasl/lib" -j$(( $(grep -c ^processor /proc/cpuinfo) / 2 )) --win-version-min=win10
python: '/cygdrive/c/python/python37/python.exe'
tasks:
diff --git a/evergreen/build_metric_cedar_report.py b/evergreen/build_metric_cedar_report.py
index 03f9a155a11..a7959329495 100644
--- a/evergreen/build_metric_cedar_report.py
+++ b/evergreen/build_metric_cedar_report.py
@@ -66,6 +66,11 @@ with open(clean_build_metrics_json) as f:
cedar_report.append(single_metric_test("Total Build time", "seconds", build_metrics['scons_metrics']['time']['total']))
cedar_report.append(single_metric_test("Total Build output size", "MBs", build_metrics['artifact_metrics']['total_artifact_size'] / 1024.0 / 1024.0))
+ try:
+ cedar_report.append(single_metric_test("Transitive Libdeps Edges", "edges", build_metrics['libdeps_metrics']['TRANS_EDGE']))
+ except KeyError:
+ pass
+
mongod_metrics = None
for artifact in build_metrics['artifact_metrics']['artifacts']:
if artifact['name'] == 'build/metrics/mongo/db/mongod':