-
Notifications
You must be signed in to change notification settings - Fork 6
Cod 1815 - Add the full command command that was run to the benchmark uri #191
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
GuillaumeLagrange
merged 5 commits into
main
from
cod-1815-add-the-command-that-was-run-to-the-upload-payload-and
Jan 14, 2026
+223
−27
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
01fcd3f
feat(exec-harness): add the full command to the uri and handle hyphen…
GuillaumeLagrange c1d91af
chore: remove double metadata information
GuillaumeLagrange 7a24f1d
feat(exec-harness): add integration tests for complex cli commands
GuillaumeLagrange 1b0b0f3
ci: install exec-harness before runner tests tests
GuillaumeLagrange 1ac1eae
ci: switch to rust-cache to cache builds of the installed workspace b…
GuillaumeLagrange 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
Some comments aren't visible on the classic Files Changed page.
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 |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| use crate::prelude::*; | ||
|
|
||
| pub(crate) struct NameAndUri { | ||
| pub(crate) name: String, | ||
| pub(crate) uri: String, | ||
| } | ||
|
|
||
| /// Maximum length for benchmark name to avoid excessively long URIs | ||
| /// Should be removed once we have structured metadata around benchmarks | ||
| const MAX_NAME_LENGTH: usize = 1024 - 100; | ||
|
|
||
| pub(crate) fn generate_name_and_uri(name: &Option<String>, command: &[String]) -> NameAndUri { | ||
| let mut name = name.clone().unwrap_or_else(|| command.join(" ")); | ||
| let uri = format!("exec_harness::{name}"); | ||
|
|
||
| if name.len() > MAX_NAME_LENGTH { | ||
| warn!( | ||
| "Benchmark name is too long ({} characters). Truncating to {} characters.", | ||
| name.len(), | ||
| MAX_NAME_LENGTH | ||
| ); | ||
| name.truncate(MAX_NAME_LENGTH); | ||
| } | ||
|
|
||
| NameAndUri { name, uri } | ||
| } |
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
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.
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.
We also have the executor tests, which already include a lot of these edge cases:
runner/src/executor/tests.rs
Lines 14 to 50 in 0cfb188
We should test it there, so that we can reuse the existing test cases that ensure that the same shell scripts work across all executors.
Uh oh!
There was an error while loading. Please reload this page.
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.
As discussed, I added a small subset of commands to run with the exec-harness. For now, script-like multi-commands are kinda out of scope, we'll see if we get user demand.
Kept the integration tests in the exec-harness, we'll see if we need more integration tests with pipes and whatnot form the codspeed runner