From 6a1216bd5102fc8e533bb6b57dc5352d7af5de92 Mon Sep 17 00:00:00 2001 From: Tamo Date: Mon, 13 Dec 2021 18:50:35 +0100 Subject: [PATCH] Integrate telegraf into our CI --- .../{benchmarks.yml => manual_benchmarks.yml} | 0 ...rks_indexing.yml => push_benchmarks_indexing.yml} | 12 +++++++++--- ...search_geo.yml => push_benchmarks_search_geo.yml} | 12 +++++++++--- ...ch_songs.yml => push_benchmarks_search_songs.yml} | 12 +++++++++--- ...arch_wiki.yml => push_benchmarks_search_wiki.yml} | 12 +++++++++--- 5 files changed, 36 insertions(+), 12 deletions(-) rename .github/workflows/{benchmarks.yml => manual_benchmarks.yml} (100%) rename .github/workflows/{cron_benchmarks_indexing.yml => push_benchmarks_indexing.yml} (88%) rename .github/workflows/{cron_benchmarks_search_geo.yml => push_benchmarks_search_geo.yml} (88%) rename .github/workflows/{cron_benchmarks_search_songs.yml => push_benchmarks_search_songs.yml} (88%) rename .github/workflows/{cron_benchmarks_search_wiki.yml => push_benchmarks_search_wiki.yml} (87%) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/manual_benchmarks.yml similarity index 100% rename from .github/workflows/benchmarks.yml rename to .github/workflows/manual_benchmarks.yml diff --git a/.github/workflows/cron_benchmarks_indexing.yml b/.github/workflows/push_benchmarks_indexing.yml similarity index 88% rename from .github/workflows/cron_benchmarks_indexing.yml rename to .github/workflows/push_benchmarks_indexing.yml index 452966194..4a0dd6a10 100644 --- a/.github/workflows/cron_benchmarks_indexing.yml +++ b/.github/workflows/push_benchmarks_indexing.yml @@ -1,10 +1,12 @@ -name: Benchmarks indexing (cron) +name: Benchmarks indexing (push) on: - schedule: - - cron: "30 0 * * FRI" # every friday at 00:30 + push: + branches: + - main env: + INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }} BENCH_NAME: "indexing" jobs: @@ -61,6 +63,10 @@ jobs: source: ${{ steps.file.outputs.basename }}.json out_dir: critcmp_results + # Upload benchmarks to influxdb + - name: Upload ${{ steps.file.outputs.basename }}.json to influxDB + run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug + # Helper - name: 'README: compare with another benchmark' run: | diff --git a/.github/workflows/cron_benchmarks_search_geo.yml b/.github/workflows/push_benchmarks_search_geo.yml similarity index 88% rename from .github/workflows/cron_benchmarks_search_geo.yml rename to .github/workflows/push_benchmarks_search_geo.yml index 642b5018e..ef7c05cd6 100644 --- a/.github/workflows/cron_benchmarks_search_geo.yml +++ b/.github/workflows/push_benchmarks_search_geo.yml @@ -1,11 +1,13 @@ -name: Benchmarks search geo (cron) +name: Benchmarks search geo (push) on: - schedule: - - cron: "30 18 * * FRI" # every friday at 18:30 + push: + branches: + - main env: BENCH_NAME: "search_geo" + INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }} jobs: benchmarks: @@ -61,6 +63,10 @@ jobs: source: ${{ steps.file.outputs.basename }}.json out_dir: critcmp_results + # Upload benchmarks to influxdb + - name: Upload ${{ steps.file.outputs.basename }}.json to influxDB + run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug + # Helper - name: 'README: compare with another benchmark' run: | diff --git a/.github/workflows/cron_benchmarks_search_songs.yml b/.github/workflows/push_benchmarks_search_songs.yml similarity index 88% rename from .github/workflows/cron_benchmarks_search_songs.yml rename to .github/workflows/push_benchmarks_search_songs.yml index d15cc7ab6..82d764434 100644 --- a/.github/workflows/cron_benchmarks_search_songs.yml +++ b/.github/workflows/push_benchmarks_search_songs.yml @@ -1,11 +1,13 @@ -name: Benchmarks search songs (cron) +name: Benchmarks search songs (push) on: - schedule: - - cron: "30 08 * * FRI" # every friday at 08:30 + push: + branches: + - main env: BENCH_NAME: "search_songs" + INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }} jobs: benchmarks: @@ -61,6 +63,10 @@ jobs: source: ${{ steps.file.outputs.basename }}.json out_dir: critcmp_results + # Upload benchmarks to influxdb + - name: Upload ${{ steps.file.outputs.basename }}.json to influxDB + run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug + # Helper - name: 'README: compare with another benchmark' run: | diff --git a/.github/workflows/cron_benchmarks_search_wiki.yml b/.github/workflows/push_benchmarks_search_wiki.yml similarity index 87% rename from .github/workflows/cron_benchmarks_search_wiki.yml rename to .github/workflows/push_benchmarks_search_wiki.yml index c73e8c037..efb18d86d 100644 --- a/.github/workflows/cron_benchmarks_search_wiki.yml +++ b/.github/workflows/push_benchmarks_search_wiki.yml @@ -1,11 +1,13 @@ -name: Benchmarks search wikipedia articles (cron) +name: Benchmarks search wikipedia articles (push) on: - schedule: - - cron: "30 16 * * FRI" # every friday at 16:30 (it’s snacky snack-time!) + push: + branches: + - main env: BENCH_NAME: "search_wiki" + INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }} jobs: benchmarks: @@ -61,6 +63,10 @@ jobs: source: ${{ steps.file.outputs.basename }}.json out_dir: critcmp_results + # Upload benchmarks to influxdb + - name: Upload ${{ steps.file.outputs.basename }}.json to influxDB + run: telegraf --config https://eu-central-1-1.aws.cloud2.influxdata.com/api/v2/telegrafs/08b52e34a370b000 --once --debug + # Helper - name: 'README: compare with another benchmark' run: |