From: Mitchell Hwang <16830051+mdh1418@users.noreply.github.com> Date: Mon, 9 Sep 2024 23:48:30 +0000 (-0400) Subject: [Tools] Explicitly log new format file creation (#4918) X-Git-Tag: accepted/tizen/unified/20241231.014852~39^2^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f6ac55b86f797f1722fdc93aae13cb0c8eb8cdde;p=platform%2Fcore%2Fdotnet%2Fdiagnostics.git [Tools] Explicitly log new format file creation (#4918) Fixes https://github.com/dotnet/diagnostics/issues/4908 --- diff --git a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs index 97007d3d1..f1f40b384 100644 --- a/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs +++ b/src/Tools/dotnet-trace/CommandLine/Commands/CollectCommand.cs @@ -45,7 +45,7 @@ namespace Microsoft.Diagnostics.Tools.Trace /// Sets the size of the in-memory circular buffer in megabytes. /// A list of EventPipe providers to be enabled. This is in the form 'Provider[,Provider]', where Provider is in the form: 'KnownProviderName[:Flags[:Level][:KeyValueArgs]]', and KeyValueArgs is in the form: '[key1=value1][;key2=value2]' /// A named pre-defined set of provider configurations that allows common tracing scenarios to be specified succinctly. - /// The desired format of the created trace file. + /// If not using the default NetTrace format, an additional file will be emitted with the specified format under the same output name and with the corresponding format extension. /// The duration of trace to be taken. /// A list of CLR events to be emitted. /// The verbosity level of CLR events diff --git a/src/Tools/dotnet-trace/CommandLine/Options/CommonOptions.cs b/src/Tools/dotnet-trace/CommandLine/Options/CommonOptions.cs index 0500292d6..a5e9fd7ad 100644 --- a/src/Tools/dotnet-trace/CommandLine/Options/CommonOptions.cs +++ b/src/Tools/dotnet-trace/CommandLine/Options/CommonOptions.cs @@ -28,7 +28,7 @@ namespace Microsoft.Diagnostics.Tools.Trace public static Option FormatOption() => new( alias: "--format", - description: $"Sets the output format for the trace file. Default is {DefaultTraceFileFormat()}.") + description: $"If not using the default NetTrace format, an additional file will be emitted with the specified format under the same output name and with the corresponding format extension. The default format is {DefaultTraceFileFormat()}.") { Argument = new Argument(name: "trace-file-format", getDefaultValue: DefaultTraceFileFormat) }; diff --git a/src/Tools/dotnet-trace/TraceFileFormatConverter.cs b/src/Tools/dotnet-trace/TraceFileFormatConverter.cs index f383a7453..b954cf052 100644 --- a/src/Tools/dotnet-trace/TraceFileFormatConverter.cs +++ b/src/Tools/dotnet-trace/TraceFileFormatConverter.cs @@ -36,14 +36,13 @@ namespace Microsoft.Diagnostics.Tools.Trace internal static void ConvertToFormat(IConsole console, TraceFileFormat format, string fileToConvert, string outputFilename) { - console.Out.WriteLine($"Writing:\t{outputFilename}"); - switch (format) { case TraceFileFormat.NetTrace: break; case TraceFileFormat.Speedscope: case TraceFileFormat.Chromium: + console.Out.WriteLine($"Processing trace data file '{fileToConvert}' to create a new {format} file '{outputFilename}'."); try { Convert(console, format, fileToConvert, outputFilename);