Skip to content

Commit 5b6004b

Browse files
Merge branch 'scalability/minor-week-22' into 'master'
Benchmark queries w/ caching + retry create challenge in delegation experiment. If this works, can do something similar for other failing calls. See merge request dfinity-lab/public/ic!12627
2 parents 71bd947 + bf836f3 commit 5b6004b

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

gitlab-ci/config/60--benchmark-test--spawn-benchmark-pipeline.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,22 @@ maximum-capacity-system-baseline-query:
7777
$SHELL_WRAPPER timeout 1h ./testnet/tools/icos_deploy.sh $TESTNET --git-revision "$GIT_REVISION" --no-boundary-nodes
7878
cd ./scalability
7979
80-
$SHELL_WRAPPER python3 experiments/run_system_baseline_experiment.py --use_random_payload=True --num_canisters 2 --testnet $TESTNET --wg_subnet 2 --wg_testnet $TESTNET --datapoints 100,3500,4500,5500,7500,8500,12000,17200,40000
80+
# First run, no caching
81+
# -------------------------------------------------
82+
83+
$SHELL_WRAPPER python3 experiments/run_system_baseline_experiment.py --use_random_payload=True --num_canisters 2 --testnet $TESTNET --wg_subnet 2 --wg_testnet $TESTNET --datapoints 100,3500,4500,5500,7500,12000,17200,40000
84+
85+
TIMESTAMP=$(find results/"$GIT_REVISION" -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -nr | head -1)
86+
$SHELL_WRAPPER python3 common/generate_report.py --base_dir="results/" --git_revision="$GIT_REVISION" --timestamp="$TIMESTAMP"
87+
$SHELL_WRAPPER python3 common/notify_dashboard.py --base_dir="results/" --git_revision="$GIT_REVISION" --timestamp="$TIMESTAMP" --is_max_capacity_run="True" --branch="$CURRENT_BRANCH" --gitlab_job_id="$CI_JOB_ID"
88+
89+
# Allow the system some time to recover from previous benchmark
90+
sleep 60
91+
92+
# Second run, with caching
93+
# -------------------------------------------------
94+
95+
$SHELL_WRAPPER python3 experiments/run_system_baseline_experiment.py --num_canisters 2 --testnet $TESTNET --wg_subnet 2 --wg_testnet $TESTNET --datapoints 100,3500,4500,5500,7500,12000,17200,40000
8196
8297
TIMESTAMP=$(find results/"$GIT_REVISION" -maxdepth 1 -mindepth 1 -type d -printf "%f\n" | sort -nr | head -1)
8398
$SHELL_WRAPPER python3 common/generate_report.py --base_dir="results/" --git_revision="$GIT_REVISION" --timestamp="$TIMESTAMP"
@@ -86,8 +101,10 @@ maximum-capacity-system-baseline-query:
86101
find . -name 'workload-generator*stderr.txt' -print0 | xargs -0 pigz
87102
cd -
88103
104+
# Upload results from both run (the entire folder of that GIT revision)
89105
$SHELL_WRAPPER rclone --config="${CI_PROJECT_DIR}/.rclone.conf" copyto "scalability/results/$GIT_REVISION" "performance-testing:performance-testing-results/$GIT_REVISION"
90106
107+
91108
# BENCHMARK SUITE maximum_capacity_system_baseline with update calls
92109
maximum-capacity-system-baseline-update:
93110
extends: .benchmark-test

scalability/common/cdweekly_results.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# Guidance: https://plotly.com/javascript/hover-text-and-formatting/
3636
HOVERTEMPLATE = """
3737
<b>Click for full report</b><br><br>
38-
%{yaxis.title.text}: %{y:,.0f}<br>
38+
%{yaxis.title.text}: %{y:,.2f}<br>
3939
%{xaxis.title.text}: %{x}<br>
4040
<br>
4141
%{text}

scalability/common/delegation.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
from ic.canister import Canister
1010
from ic.client import Client
1111
from ic.identity import DelegateIdentity, Identity
12+
from retry.api import retry_call
1213

1314
logging.basicConfig(level=logging.INFO)
1415

@@ -100,7 +101,7 @@ def get_delegation(host_url, ii_canister_id):
100101

101102
identityCanister = Canister(agent=agent, canister_id=ii_canister_id, candid=identity_canister_did)
102103
logging.info(f"II: Creating challenge .. on {host_url} using canister {ii_canister_id}")
103-
challenge = identityCanister.create_challenge()
104+
challenge = retry_call(identityCanister.create_challenge)
104105

105106
# Call still failed after reinstalling
106107
if challenge is None:

scalability/experiments/run_system_baseline_experiment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ def run_iterations(self, iterations=None):
183183

184184
# Write summary file in each iteration including experiment specific data.
185185
self.write_summary_file(
186-
"run_system_baseline_experiment",
186+
"run_system_baseline_experiment" if FLAGS.use_random_payload else "run_system_baseline_experiment_cached",
187187
{
188188
"is_update": FLAGS.use_updates,
189189
"total_requests": total_requests,

0 commit comments

Comments
 (0)