-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into optional-tests
- Loading branch information
Showing
12 changed files
with
486 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
variables: | ||
BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:libdatadog-benchmarks | ||
# The Dockerfile to this image is located at: | ||
# https://github.com/DataDog/benchmarking-platform/tree/libdatadog/benchmarks | ||
|
||
benchmarks: | ||
tags: ["runner:apm-k8s-tweaked-metal"] | ||
needs: [] | ||
image: | ||
name: $BASE_CI_IMAGE | ||
interruptible: true | ||
timeout: 1h | ||
script: | ||
- export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :) | ||
- git clone --branch libdatadog/benchmarks https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/benchmarking-platform /platform && cd /platform | ||
- ./steps/capture-hardware-software-info.sh | ||
- ./steps/run-benchmarks.sh | ||
- ./steps/analyze-results.sh | ||
- "./steps/upload-results-to-s3.sh || :" | ||
- "./steps/post-pr-comment.sh || :" | ||
artifacts: | ||
name: "reports" | ||
paths: | ||
- reports/ | ||
expire_in: 3 months | ||
variables: | ||
UPSTREAM_PROJECT_ID: $CI_PROJECT_ID # The ID of the current project. This ID is unique across all projects on the GitLab instance. | ||
UPSTREAM_PROJECT_NAME: $CI_PROJECT_NAME # libdatadog | ||
UPSTREAM_BRANCH: $CI_COMMIT_REF_NAME # The branch or tag name for which project is built. | ||
UPSTREAM_COMMIT_SHA: $CI_COMMIT_SHA # The commit revision the project is built for. | ||
UPSTREAM_REPO_URL: "https://github.com/DataDog/libdatadog" # The HTTP URL to the project's repository. | ||
|
||
KUBERNETES_SERVICE_ACCOUNT_OVERWRITE: libdatadog | ||
FF_USE_LEGACY_KUBERNETES_EXECUTION_STRATEGY: "true" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Copyright 2021-Present Datadog, Inc. https://www.datadoghq.com/ | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -eu | ||
|
||
function message() { | ||
local message=$1 verbose=${2:-"true"} | ||
if [[ "${verbose}" == "true" ]]; then | ||
echo "$(date +"%T%:z"): $message" | ||
fi | ||
} | ||
|
||
CURRENT_PATH=$(pwd) | ||
readonly CURRENT_PATH="${CURRENT_PATH%/}" | ||
readonly SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]:-$0}")" &>/dev/null && pwd 2>/dev/null)" | ||
readonly PROJECT_DIR="${SCRIPT_DIR}/.." | ||
OUTPUT_DIR="${1:-}" | ||
|
||
pushd "${PROJECT_DIR}" > /dev/null | ||
|
||
# Run benchmarks | ||
# TODO https://datadoghq.atlassian.net/browse/APMSP-1228 | ||
# Right now we are only running a single benchmark to test the CI setup, and there is only | ||
# support for the Criterion SamplingMode::Flat in the new benchmarking framework. This will be | ||
# worked on going forward. | ||
message "Running benchmarks" | ||
cargo bench -p datadog-trace-obfuscation --bench trace_obfuscation -- sql/obfuscate_sql_string | ||
message "Finished running benchmarks" | ||
|
||
# Copy the benchmark results to the output directory | ||
if [[ -n "${OUTPUT_DIR}" && -d "target" ]]; then | ||
# Is this a relative path? | ||
if [[ "$OUTPUT_DIR" != /* ]]; then | ||
OUTPUT_DIR="${CURRENT_PATH}/${OUTPUT_DIR}" | ||
fi | ||
message "Copying benchmark results to ${OUTPUT_DIR}" | ||
pushd target > /dev/null | ||
find criterion -type d -regex '.*/new$' | while read -r dir; do | ||
mkdir -p "${OUTPUT_DIR}/${dir}" | ||
cp -r "${dir}"/* "${OUTPUT_DIR}/${dir}" | ||
done | ||
popd > /dev/null | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.