Skip to content

Commit

Permalink
server: bench: create a script to wrap all operations
Browse files Browse the repository at this point in the history
  • Loading branch information
phymbert committed Mar 25, 2024
1 parent 989fb08 commit f369006
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,21 @@ jobs:
- name: Comment PR
uses: mshick/add-pr-comment@v2
id: comment_pr
if: ${{ github.event.pull_request }}
with:
message-id: bench-${{ github.job }}-${{ env.RUNNER_LABEL }}
message: |
Hello from: $BENCH_PR_COMMENT
Hello from: $BENCH_PR_COMMENT
- name: Commit status
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: ${{ github.job }}
description: |
{
"http_req_duration_avg": ${{ env.HTTP_REQ_DURATION_AVG }},
"http_req_duration_p90": ${{ env.HTTP_REQ_DURATION_P_90_ }}
}
state: 'success'
2 changes: 1 addition & 1 deletion examples/server/bench/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def main(args_in: list[str] | None = None) -> None:

with open("results.github.env", 'a') as github_env:
pr_comment = pr_comment.replace('\n', '<br/>')
github_env.write(f"BENCH_PR_COMMENT={pr_comment}")
github_env.write(f"BENCH_PR_COMMENT='{pr_comment}'")


def start_benchmark(args):
Expand Down

0 comments on commit f369006

Please sign in to comment.