Repository navigation
Conversation
ScriptExecutor expects the script to emit its metrics as 'test-metrics.json'
in the script directory. When multiple Virtual Client instances run
concurrently against a shared package directory, every instance resolves the
same metrics file path. Each instance then deletes that file during
initialization as part of clearing stale results, which can remove the metrics
file belonging to another experiment.
This adds an optional 'MetricsFileDirectory' parameter that supplies a
directory path, relative to the script directory, in which the script writes
the metrics file (e.g. {experimentId}). The metrics file name itself is
unchanged, so the contract with the script is preserved. When the parameter is
not defined the behavior is exactly as before.
The example profile and the extensions documentation are updated to describe
the parameter.
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
imadityaa
approved these changes
Sep 30, 2026
imadityaa
approved these changes
Sep 30, 2026
imadityaa
enabled auto-merge (squash)
September 30, 2026 10:17
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
ScriptExecutorexpects the script under execution to emit its metrics astest-metrics.jsonin the script directory:When several Virtual Client instances run concurrently on the same machine against a shared package directory (a common lab/harness setup), every instance resolves the same metrics file path. Each instance then deletes that file during
InitializeAsyncwhile clearing stale results, so one experiment can remove the metrics file belonging to another experiment that is mid-run.There is currently no way to scope the metrics file per instance.
LogPathscan already be scoped by supplying a relative prefix, but the metrics path is fixed.Change
Adds an optional
MetricsFileDirectoryparameter that supplies a directory path, relative to the script directory, in which the script writes the metrics file:Since profile parameters are resolved by
EvaluateParametersAsyncbefore the path is composed, placeholders such as{experimentId}work as expected, giving each concurrent instance its own metrics file.Notes on scope:
test-metrics.json), since that is the contract with the script. Only the containing directory is configurable.MetricsFilePathresolves exactly as before, so existing profiles are unaffected.The example profile (
EXAMPLE-EXECUTE-SCRIPT.json) and the extensions guide are updated to document the parameter.Validation
dotnet build src/VirtualClient/VirtualClient.sln -c Debug— succeeds, 0 warnings, 0 errors.VirtualClient.Actions.UnitTestsfiltered toScriptExecutor— 32/32 passing.EXAMPLE-EXECUTE-SCRIPT.jsonvalidated as well-formed JSON.