-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ts/generalize bench runs #1329
Closed
Closed
Ts/generalize bench runs #1329
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,140 @@ | ||
name: "Bench ArmoniK on localhost" | ||
|
||
on: | ||
push: | ||
branches: | ||
- "main" | ||
- "ts/generalize-bench-runs" | ||
workflow_dispatch: # Possibility to run this workflow for debugging purposes | ||
# inputs can be useful for tests in further developments | ||
inputs: | ||
htcmock-ntasks: | ||
description: "Number of tasks to be created for HTC Mock" | ||
default: "100" | ||
required: false | ||
htcmock-subtasks-levels: | ||
description: "Levels of subtasking for HTC Mock" | ||
default: "1" | ||
required: false | ||
htcmock-polling-limit: | ||
description: "Polling duration (in seconds) for HTC Mock session completion" | ||
default: "180" | ||
required: false | ||
bench-ntasks: | ||
description: "Number of tasks to be created for Bench " | ||
default: "1000" | ||
required: false | ||
bench-polling-limit: | ||
description: "Polling duration (in seconds) for Bench session completion" | ||
default: "1200" | ||
purge-data: | ||
description: "Whether to purge session" | ||
default: "false" | ||
required: false | ||
release: | ||
types: [created, published] | ||
|
||
jobs: | ||
benchmark: | ||
name: Bench ArmoniK on localhost | ||
runs-on: ubuntu-latest | ||
outputs: | ||
terraform-output: ${{ steps.deploy.outputs.terraform-output }} | ||
armonik-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 | ||
|
||
- name: Install Dependencies | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/dependencies@main | ||
with: | ||
terraform: true | ||
k3s: true | ||
docker: true | ||
|
||
- name: Define runner env variables | ||
run: | | ||
echo "core-version=$(cat versions.tfvars.json | jq -r '.armonik_versions.core')" >> $GITHUB_ENV | ||
echo "htcmock-ntasks=${{ inputs.htcmock-ntasks || null }}" >> $GITHUB_ENV | ||
echo "htcmock-subtasks-levels=${{ inputs.htcmock-subtasks-levels || null }}" >> $GITHUB_ENV | ||
echo "htcmock-polling-limit=${{ inputs.htcmock-polling-limit || null }}" >> $GITHUB_ENV" | ||
echo "bench-ntasks=${{ inputs.bench-ntasks || null }}" >> $GITHUB_ENV | ||
echo "bench-polling-limit=${{ inputs.bench-polling-limit || null }}" >> $GITHUB_ENV" | ||
echo "purge-data=${{ inputs.purge-data || false }}" >> $GITHUB_ENV | ||
|
||
- id: deploy | ||
name: "Deploy ArmoniK" | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/deploy@main | ||
with: | ||
type: localhost | ||
|
||
- id: get-armonik-endpoint | ||
name: "Get ArmoniK's control plane endpoint" | ||
run: | | ||
grpc-endpoint=$(cat infrastructure/quick-deploy/localhost/generated/armonik-output.json | jq -r '.armonik.control_plane_url' | sed -r 's/(http:\/\/)([^:]*)(:.*)/\2/') | ||
echo "grpc-endpoint=$grpc-endpoint" >> "$GITHUB_OUTPUT" | ||
|
||
- id: htcmock | ||
name: Run HTC Mock | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/htcmock@main | ||
with: | ||
armonik-core-version: ${{ env.core-version }} | ||
ntasks: ${{ env.htcmock-ntasks || null}} | ||
subtasks-levels: ${{ env.htcmock-subtasks-levels || null}} | ||
session-name: htcmock | ||
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.grpc-endpoint }} | ||
purge-data: ${{ env.purge-data }} | ||
|
||
- id: get-htcmock-stats | ||
name: Get HTC Mock Stats | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/get-throughput@main | ||
with: | ||
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }} | ||
session-name: ${{ steps.htcmock.outputs.session-name }} | ||
|
||
- name: Upload HTC Mock results to artifact registry | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: main_benchmark_htcmock_${{ github.run_id }} | ||
path: ${{ steps.get-htcmock-stats.outputs.bench-file-path }} | ||
|
||
- id: bench | ||
name: Run Bench | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/htcmock@ts/add-bench-action | ||
with: | ||
armonik-core-version: ${{ env.core-version }} | ||
ntasks: ${{ env.bench-ntasks }} | ||
session-name: bench | ||
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.grpc-endpoint }} | ||
purge-data: ${{ env.purge-data }} | ||
|
||
- id: get-bench-stats | ||
name: Get Bench Stats | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/get-throughput@main | ||
with: | ||
grpc-client-endpoint: ${{ steps.get-armonik-endpoint.outputs.endpoint }} | ||
session-name: ${{ steps.bench.outputs.session-name }} | ||
|
||
- name: Upload Bench results to artifact registry | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: main_benchmark_bench_${{ github.run_id }} | ||
path: ${{ steps.get-bench-stats.outputs.bench-file-path }} | ||
|
||
- name: Upload benchmarks results to s3 | ||
env: | ||
HTCMOCK_RESULTS_PATH: ${{ steps.get-htcmock-stats.outputs.bench-file-path }} | ||
BENCH_RESULTS_PATH: ${{ steps.get-bench-stats.outputs.bench-file-path }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
AWS_EC2_METADATA_DISABLED: true | ||
run: | | ||
aws s3 cp "$HTCMOCK_RESULTS_PATH" "s3://test-armonik-bench-storage/main_benchmark_htcmock_$GITHUB_RUN_ID.json" | ||
aws s3 cp "$BENCH_RESULTS_PATH" "s3://test-armonik-bench-storage/main_benchmark_bench_$GITHUB_RUN_ID.json" | ||
|
||
- if: "always()" | ||
id: destroy | ||
name: Destroy deployment | ||
uses: aneoconsulting/ArmoniK.Action.Deploy/destroy@main | ||
with: | ||
type: localhost |
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,35 @@ | ||
apiVersion: batch/v1 | ||
kind: Job | ||
metadata: | ||
name: bench-htcmock | ||
namespace: armonik | ||
spec: | ||
ttlSecondsAfterFinished: 0 | ||
template: | ||
spec: | ||
containers: | ||
- name: htcmock-session | ||
Check warning Code scanning / SonarCloud Memory limits should be enforced Medium
Specify a memory limit for this container. See more on SonarCloud
Check warning Code scanning / SonarCloud Storage limits should be enforced Medium
Specify a storage limit for this container. See more on SonarCloud
|
||
image: dockerhubaneo/armonik_core_htcmock_test_client:@@ARMONIK_CORE_VERSION@@ | ||
env: | ||
- name: HtcMock__NTasks | ||
value: "@@NTASKS@@" | ||
- name: HtcMock__TotalCalculationTime | ||
value: "00:00:00.100" | ||
- name: HtcMock__DataSize | ||
value: "1" | ||
- name: HtcMock__MemorySize | ||
value: "1" | ||
- name: HtcMock__EnableFastCompute | ||
value: "true" | ||
- name: HtcMock__SubTasksLevels | ||
value: "@@SUBTASKS_LEVELS@@" | ||
- name: HtcMock__Partition | ||
value: htcmock | ||
- name: HtcMock__Options__SessionName | ||
value: "@@SESSION_NAME@@" | ||
- name: HtcMock__PurgeData | ||
value: "@@PURGE_DATA@@" | ||
- name: GrpcClient__Endpoint | ||
value: http://@@GRPC_CLIENT_ENDPOINT@@:5001 | ||
|
||
restartPolicy: Never |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / SonarCloud
Service account permissions should be restricted Medium