From 46608f533c60bccdd03e417b796fb3ad9acdc07c Mon Sep 17 00:00:00 2001 From: Ikiru Yoshizaki <3856350+guitarrapc@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:27:20 +0900 Subject: [PATCH] ci: allow run benchmark on schedule --- .github/workflows/benchmark.yml | 4 +++- perf/BenchmarkApp/PerformanceTest.Client/Program.cs | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 06c906d95..6f82c007a 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -3,6 +3,8 @@ name: Benchmark on: issue_comment: types: [created] + schedule: + - cron: "0 0 * * *" workflow_dispatch: inputs: reuse: @@ -48,7 +50,7 @@ jobs: benchmark-name: "magiconion-${{ github.event.issue.number || (inputs.reuse && 'wf' || github.run_number) }}" benchmark-timeout: 20 # 10min (env prepare) + 5min (clone & benchmark) + 5min (spare) client-benchmark-script-path: ".github/scripts/run-benchmark-client.sh" - client-benchmark-script-args: "--args \"-u http://${BENCHMARK_SERVER_NAME}:5000 -s CI --channels ${{ matrix.channels }} --streams ${{ matrix.streams }} --tags '${{ matrix.tags }}'\"" + client-benchmark-script-args: "--args \"-u http://${BENCHMARK_SERVER_NAME}:5000 -s CI --channels ${{ matrix.channels }} --streams ${{ matrix.streams }} --validate true --tags '${{ matrix.tags }}'\"" server-benchmark-script-path: ".github/scripts/run-benchmark-server.sh" server-benchmark-script-args: "" secrets: inherit diff --git a/perf/BenchmarkApp/PerformanceTest.Client/Program.cs b/perf/BenchmarkApp/PerformanceTest.Client/Program.cs index 986c9cc72..1b4b32c10 100644 --- a/perf/BenchmarkApp/PerformanceTest.Client/Program.cs +++ b/perf/BenchmarkApp/PerformanceTest.Client/Program.cs @@ -24,11 +24,12 @@ async Task Main( uint rounds = 1, [Option("v")] bool verbose = false, SerializationType serialization = SerializationType.MessagePack, + bool validate = false, string? tags = null ) { var config = new ScenarioConfiguration(url, warmup, duration, streams, channels, verbose); - var datadog = DatadogMetricsRecorder.Create(tags); + var datadog = DatadogMetricsRecorder.Create(tags, validate: validate); PrintStartupInformation();