-
Notifications
You must be signed in to change notification settings - Fork 242
benchmarks: durdir benchmark that evaluates the efficacy and performance of DurDir #907
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
Merged
Max Smythe (maxsmythe)
merged 10 commits into
agent-substrate:main
from
sairajp-rewind:benchmarks/durdir-673
Aug 19, 2026
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
60cbfb0
glutton: return size and digest from WriteDisk, add ReadDisk
sairajp-rewind 11f35d1
glutton: expose disk RPCs over HTTP mode
sairajp-rewind df19487
benchmarking: add DurDir-backed glutton ActorTemplates
sairajp-rewind fc74624
boomer: add the DurDir benchmark task
sairajp-rewind ab73710
boomer: fail loudly on an invalid dynconfig value
sairajp-rewind 712e69c
benchmarking: wire the DurDir user class into both harnesses
sairajp-rewind 99ada82
benchmarking: add DurDir nightly scenarios and docs
sairajp-rewind a5a2f7c
boomer: register user classes in a registry
sairajp-rewind df3f768
boomer: suspend DurDir actors before deleting them
sairajp-rewind 2249813
benchmarking: move the glutton HTTP fake into its own package
sairajp-rewind 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -17,6 +17,8 @@ | |
| Flag registration lives in the modules that own each flag: | ||
| * --trace-probability → common.trace.init_tracing | ||
| * --min-wait-time / --max-wait-time → common.wait_time.init_wait_time | ||
| * --resume-mode → common.resume_mode.add_resume_mode_arguments | ||
| * --durdir-* → common.durdir_config.add_durdir_arguments | ||
|
|
||
| This module ties them together so boomer-Go workers can pick up the values | ||
| the operator set in the web UI form: | ||
|
|
@@ -34,17 +36,19 @@ | |
| import logging | ||
| from collections.abc import Iterable | ||
|
|
||
| from locust import events | ||
| from locust.env import Environment | ||
|
|
||
| from common.trace import init_tracing | ||
| from common.wait_time import init_wait_time | ||
|
|
||
| logger = logging.getLogger(__name__) | ||
|
|
||
| # Boomer-tunable flags. CLI form ("--foo-bar") is converted to the | ||
| # attribute / JSON-key form ("foo_bar") by _attr(). | ||
| _FLAGS = ("--trace-probability", "--min-wait-time", "--max-wait-time") | ||
| # Boomer-tunable flags and their types. CLI form ("--foo-bar") is converted | ||
| # to the attribute / JSON-key form ("foo_bar") by _attr(). | ||
| _FLAGS = { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a thing for this review, but probably the correct way to do this is to add each flag to a unified registry upon import. Again, not a thing for this PR but a cleanup for later to help remove duplicate sources of truth. |
||
| "--trace-probability": float, | ||
| "--min-wait-time": float, | ||
| "--max-wait-time": float, | ||
| "--durdir-file-size-bytes": int, | ||
| "--resume-mode": str, | ||
| "--durdir-read-mode": str, | ||
| "--durdir-template": str, | ||
| } | ||
|
|
||
|
|
||
| def _attr(flag: str) -> str: | ||
|
|
@@ -56,8 +60,8 @@ def build_config_json(argv: Iterable[str]) -> str: | |
| --config-json flag. Unknown args are ignored; unset flags are omitted so | ||
| boomer falls back to its own defaults.""" | ||
| p = argparse.ArgumentParser(add_help=False) | ||
| for flag in _FLAGS: | ||
| p.add_argument(flag, type=float) | ||
| for flag, type_func in _FLAGS.items(): | ||
| p.add_argument(flag, type=type_func) | ||
| parsed, _ = p.parse_known_args(argv) | ||
| cfg = { | ||
| _attr(f): getattr(parsed, _attr(f)) | ||
|
|
@@ -71,6 +75,14 @@ def init_boomer_config() -> None: | |
| """Ensure the owning modules have registered the boomer-tunable flags, | ||
| then expose their current values at /boomer-config so boomer-Go workers | ||
| can fetch them at runtime.""" | ||
| from locust import events | ||
| from locust.env import Environment | ||
|
|
||
| from common.durdir_config import add_durdir_arguments | ||
| from common.resume_mode import add_resume_mode_arguments | ||
| from common.trace import init_tracing | ||
| from common.wait_time import init_wait_time | ||
|
|
||
| init_tracing() | ||
| init_wait_time() | ||
|
|
||
|
|
@@ -82,7 +94,7 @@ def on_init(environment: Environment, **kwargs) -> None: | |
| return | ||
|
|
||
| @environment.web_ui.app.route("/boomer-config") | ||
| def boomer_config() -> dict[str, float | None]: | ||
| def boomer_config() -> dict[str, float | int | str | None]: | ||
| opts = environment.parsed_options | ||
| return {_attr(f): getattr(opts, _attr(f), None) for f in _FLAGS} | ||
|
|
||
|
|
||
This file contains hidden or 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,43 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """DurDir benchmark runtime flags.""" | ||
|
|
||
| from locust import events | ||
| from locust.argument_parser import LocustArgumentParser | ||
|
|
||
|
|
||
| @events.init_command_line_parser.add_listener | ||
| def add_durdir_arguments(parser: LocustArgumentParser) -> None: | ||
| group = parser.add_argument_group("DurDir Benchmark") | ||
| group.add_argument( | ||
| "--durdir-file-size-bytes", | ||
| type=int, | ||
| default=8388608, | ||
| help="Size of the test file written and read during the DurDir benchmark (default: 8388608 = 8 MiB)", | ||
| ) | ||
| group.add_argument( | ||
| "--durdir-read-mode", | ||
| type=str, | ||
| default="data", | ||
| choices=["data", "digest"], | ||
| help="Read mode for DurDir serves: 'data' (default) returns and client-verifies the full payload; " | ||
| "'digest' returns only size+sha256 for reduced network overhead", | ||
| ) | ||
| group.add_argument( | ||
| "--durdir-template", | ||
| type=str, | ||
| default="glutton-durdir-data", | ||
| help="ActorTemplate name to benchmark (default: glutton-durdir-data)", | ||
| ) |
This file contains hidden or 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: clarify that this is a command that is invoked by automation as a job on workload cluster. It is not meant to be run on a local machine to run tests in a headless mode.
Parallel documentation with deploy.sh makes it seem like the two approaches have equivalent UX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed