-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Add configuration variables. #109907
Add configuration variables. #109907
Conversation
Tagging subscribers to this area: @dotnet/gc |
@@ -157,9 +157,20 @@ public static int Main(string[] args) | |||
string configFile = null; | |||
bool okToContinue = true, doReplay = false; | |||
string sTests = "tests", sSeed = "seed", exectime = "maximumExecutionTime"; | |||
string output = ""; |
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.
Making use of StringBuilder here. https://learn.microsoft.com/en-us/dotnet/standard/base-types/stringbuilder
StringBuilder sb = new()
...
// To Add..
sb.AppendLine($"{kvp.Key}: {kvp.Value}");
...
// To Log..
rf._logger.WriteToInstrumentationLog(null, LoggingLevels.StartupShutdown, String.Format("Get GC Configuration Variables\n{0}",output.ToString()));
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.
or perhaps don't bother with output
at all and just write the lines one at the time?
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.
@mrsharm I have updated the source with using StringBuilder.
Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
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.
LGTM!
* Add GC configuration to log * Add GC configuration to log * Code modification after review * Code modification after review * Update src/tests/GC/Stress/Framework/ReliabilityFramework.cs Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com> --------- Co-authored-by: Mukund Raghav Sharma (Moko) <68247673+mrsharm@users.noreply.github.com> Co-authored-by: kasperk81 <83082615+kasperk81@users.noreply.github.com>
Adding the GC Configurations to logs at the start of the test by calling GC.GetConfigurationVariables().