forked from open-telemetry/opentelemetry-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'esigo-approver' of github.com:lalitb/opentelemetry-cpp …
…into esigo-approver
- Loading branch information
Showing
100 changed files
with
2,059 additions
and
385 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: OpenTelemetry-cpp benchmarks | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
deployments: write | ||
|
||
jobs: | ||
benchmark: | ||
name: Run OpenTelemetry-cpp benchmarks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Mount Bazel Cache | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: bazel_cache | ||
with: | ||
path: /home/runner/.cache/bazel | ||
key: bazel_benchmark | ||
- name: setup | ||
run: | | ||
sudo ./ci/setup_cmake.sh | ||
sudo ./ci/setup_ci_environment.sh | ||
- name: Run benchmark | ||
id: run_benchmarks | ||
run: | | ||
ci/do_ci.sh bazel.benchmark | ||
mkdir -p benchmarks | ||
mv api-benchmark_result.json benchmarks | ||
mv sdk-benchmark_result.json benchmarks | ||
mv exporters-benchmark_result.json benchmarks | ||
- uses: actions/upload-artifact@master | ||
with: | ||
name: benchmark_results | ||
path: benchmarks | ||
store_benchmark: | ||
needs: benchmark | ||
strategy: | ||
matrix: | ||
components: ["api", "sdk", "exporters"] | ||
name: Store benchmark result | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@master | ||
with: | ||
name: benchmark_results | ||
path: benchmarks | ||
- name: Print json files | ||
id: print_json | ||
run: | | ||
cat benchmarks/* | ||
- name: Push benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: OpenTelemetry-cpp ${{ matrix.components }} Benchmark | ||
tool: 'googlecpp' | ||
output-file-path: benchmarks/${{ matrix.components }}-benchmark_result.json | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
auto-push: true | ||
# Show alert with commit comment on detecting possible performance regression | ||
alert-threshold: '200%' | ||
comment-on-alert: true | ||
fail-on-alert: true | ||
gh-pages-branch: gh-pages | ||
benchmark-data-dir-path: benchmarks |
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 |
---|---|---|
|
@@ -48,3 +48,5 @@ | |
/bazel-* | ||
/plugin | ||
/build | ||
|
||
tags |
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
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,26 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
#pragma once | ||
|
||
#include <cstdint> | ||
|
||
#include "opentelemetry/version.h" | ||
|
||
/// \brief Declare variable as maybe unused | ||
/// usage: | ||
/// OPENTELEMETRY_MAYBE_UNUSED int a; | ||
/// class OPENTELEMETRY_MAYBE_UNUSED a; | ||
/// OPENTELEMETRY_MAYBE_UNUSED int a(); | ||
/// | ||
#if defined(__cplusplus) && __cplusplus >= 201703L | ||
# define OPENTELEMETRY_MAYBE_UNUSED [[maybe_unused]] | ||
#elif defined(__clang__) | ||
# define OPENTELEMETRY_MAYBE_UNUSED __attribute__((unused)) | ||
#elif defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) | ||
# define OPENTELEMETRY_MAYBE_UNUSED __attribute__((unused)) | ||
#elif (defined(_MSC_VER) && _MSC_VER >= 1910) && (defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) | ||
# define OPENTELEMETRY_MAYBE_UNUSED [[maybe_unused]] | ||
#else | ||
# define OPENTELEMETRY_MAYBE_UNUSED | ||
#endif |
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.