-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1267 from cmu-delphi/release/delphi-epidata-4.1.8
* Performance testing testing workflow (#1253) * New CTIS publication (#1255) * Newer CTIS publication * bring loggers in sync and add multiproc capabilities (#1254) * add syntax feature documentation (#1256) * Newest CTIS publication * chore: sync to www-covidcast release v3.2.7 * moving quidel signals to non-public access (#1261) with integration tests! --------- Co-authored-by: Dmytro Trotsko <dmytrotsko@gmail.com> * chore: release delphi-epidata 4.1.8 --------- Co-authored-by: Dmytro Trotsko <dmytrotsko@gmail.com> Co-authored-by: Rostyslav Zatserkovnyi <zatserkovnyi.rostyslav@gmail.com> Co-authored-by: Alex Reinhart <areinhar@stat.cmu.edu> Co-authored-by: nmdefries <42820733+nmdefries@users.noreply.github.com> Co-authored-by: melange396 <george.haff@gmail.com> Co-authored-by: minhkhul <118945681+minhkhul@users.noreply.github.com> Co-authored-by: minhkhul <minhkhul@users.noreply.github.com> Co-authored-by: melange396 <melange396@users.noreply.github.com>
- Loading branch information
Showing
21 changed files
with
480 additions
and
61 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 4.1.7 | ||
current_version = 4.1.8 | ||
commit = False | ||
tag = False | ||
|
||
|
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,102 @@ | ||
name: One-time performance testing - 9th August 2023 | ||
|
||
# Run "At every 30th minute on day-of-month 9 in August" | ||
on: | ||
schedule: | ||
- cron: '*/30 * 9 8 *' | ||
|
||
# Add some extra perms to comment on a PR | ||
permissions: | ||
pull-requests: write | ||
contents: read | ||
|
||
jobs: | ||
run-perftests: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
request_count: ${{ steps.output.outputs.request_count }} | ||
failure_count: ${{ steps.output.outputs.failure_count }} | ||
med_time: ${{ steps.output.outputs.med_time }} | ||
avg_time: ${{ steps.output.outputs.avg_time }} | ||
min_time: ${{ steps.output.outputs.min_time }} | ||
max_time: ${{ steps.output.outputs.max_time }} | ||
requests_per_sec: ${{ steps.output.outputs.requests_per_sec }} | ||
steps: | ||
- name: Set up WireGuard | ||
uses: egor-tensin/setup-wireguard@v1.2.0 | ||
with: | ||
endpoint: '${{ secrets.WG_PERF_ENDPOINT }}' | ||
endpoint_public_key: '${{ secrets.WG_PERF_ENDPOINT_PUBLIC_KEY }}' | ||
ips: '${{ secrets.WG_PERF_IPS }}' | ||
allowed_ips: '${{ secrets.WG_PERF_ALLOWED_IPS }}' | ||
private_key: '${{ secrets.WG_PERF_PRIVATE_KEY }}' | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
- name: Set up repository # mimics install.sh in the README except that delphi is cloned from the PR rather than main | ||
run: | | ||
cd .. | ||
mkdir -p driver/repos/delphi | ||
cd driver/repos/delphi | ||
git clone https://github.com/cmu-delphi/operations | ||
git clone https://github.com/cmu-delphi/utils | ||
git clone https://github.com/cmu-delphi/flu-contest | ||
git clone https://github.com/cmu-delphi/nowcast | ||
cd ../../ | ||
cd .. | ||
cp -R delphi-epidata driver/repos/delphi/delphi-epidata | ||
cd - | ||
ln -s repos/delphi/delphi-epidata/dev/local/Makefile | ||
- name: Build & run epidata | ||
run: | | ||
cd ../driver | ||
sudo make web sql="${{ secrets.DB_CONN_STRING }}" | ||
sudo make redis | ||
- name: Check out delphi-admin | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: cmu-delphi/delphi-admin | ||
token: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_PAT }} | ||
path: delphi-admin | ||
- name: Build & run Locust | ||
continue-on-error: true # sometimes ~2-5 queries fail, we shouldn't end the run if that's the case | ||
run: | | ||
cd delphi-admin/load-testing/locust | ||
docker build -t locust . | ||
export CSV=v4-requests-small.csv | ||
touch output_stats.csv && chmod 666 output_stats.csv | ||
touch output_stats_history.csv && chmod 666 output_stats_history.csv | ||
touch output_failures.csv && chmod 666 output_failures.csv | ||
touch output_exceptions.csv && chmod 666 output_exceptions.csv | ||
docker run --net=host -v $PWD:/mnt/locust -e CSV="/mnt/locust/${CSV}" locust -f /mnt/locust/v4.py --host http://127.0.0.1:10080/ --users 10 --spawn-rate 1 --headless -i "$(cat ${CSV} | wc -l)" --csv=/mnt/locust/output | ||
- name: Produce output for summary | ||
id: output | ||
uses: jannekem/run-python-script-action@v1 | ||
with: | ||
script: | | ||
import os | ||
def write_string(name, value): | ||
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh: | ||
print(f'{name}={value}', file=fh) | ||
def write_float(name, value): | ||
write_string(name, "{:.2f}".format(float(value))) | ||
with open("delphi-admin/load-testing/locust/output_stats.csv", "r", encoding="utf-8", errors="ignore") as scraped: | ||
final_line = scraped.readlines()[-1].split(",") | ||
write_string('request_count', final_line[2]) | ||
write_string('failure_count', final_line[3]) | ||
write_float('med_time', final_line[4]) | ||
write_float('avg_time', final_line[5]) | ||
write_float('min_time', final_line[6]) | ||
write_float('max_time', final_line[7]) | ||
write_float('requests_per_sec', final_line[9]) | ||
- name: Archive results as artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: locust-output | ||
path: | | ||
delphi-admin/load-testing/locust/output_*.csv |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[metadata] | ||
name = Delphi Development | ||
version = 4.1.7 | ||
version = 4.1.8 | ||
|
||
[options] | ||
packages = | ||
|
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
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
Oops, something went wrong.