File: benchmark.yml

package info (click to toggle)
opentelemetry-cpp 1.23.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,368 kB
  • sloc: cpp: 96,239; sh: 1,766; makefile: 38; python: 31
file content (84 lines) | stat: -rw-r--r-- 2,849 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: OpenTelemetry-cpp benchmarks
on:
  push:
    branches:
      - main

permissions:
  contents: read

jobs:
  benchmark:
    name: Run OpenTelemetry-cpp benchmarks
    runs-on: ubuntu-latest
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
        with:
          egress-policy: audit

      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
        with:
          submodules: 'recursive'
      - name: Mount Bazel Cache
        uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
        env:
          cache-name: bazel_cache
        with:
          path: /home/runner/.cache/bazel
          key: bazel_benchmark
      - name: setup
        run: |
          sudo ./ci/setup_ci_environment.sh
          sudo ./ci/install_bazelisk.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@6027e3dd177782cd8ab9af838c04fd81a07f1d47 # main March 2025
        with:
          name: benchmark_results
          path: benchmarks
  store_benchmark:
    needs: benchmark
    permissions:
      contents: write
      deployments: write
    strategy:
      matrix:
        components: ["api", "sdk", "exporters"]
    name: Store benchmark result
    runs-on: ubuntu-latest
    steps:
      - name: Harden the runner (Audit all outbound calls)
        uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
        with:
          egress-policy: audit

      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
      - uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # main March 2025
        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@4bdcce38c94cec68da58d012ac24b7b1155efe8b # v1.20.7
        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: false
          gh-pages-branch: gh-pages
          benchmark-data-dir-path: benchmarks