Skip to content
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

Performance counter creation script always deletes nservicebus category #27

Merged
merged 10 commits into from
Sep 19, 2017
Prev Previous commit
Next Next commit
inlining out params in script wirters
  • Loading branch information
tmasternak committed Sep 15, 2017
commit 4da343ca6ccc984790715c7f4e91de10d09dc865
3 changes: 1 addition & 2 deletions src/ScriptBuilderTask/CSharpCounterWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public static void WriteCode(string scriptPath, IEnumerable<DurationDefinition>

foreach (var signal in signals)
{
string instanceName;
legacyInstanceNameMap.TryGetValue(signal.Name, out instanceName);
legacyInstanceNameMap.TryGetValue(signal.Name, out string instanceName);

var signalDefinition = $@"new CounterCreationData(""{instanceName ?? signal.Name}"", ""{signal.Description}"", PerformanceCounterType.RateOfCountsPerSecond32),";
stringBuilder.AppendLine(signalDefinition.PadLeft(signalDefinition.Length + 8));
Expand Down
3 changes: 1 addition & 2 deletions src/ScriptBuilderTask/PowerShellCounterWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ public static void WriteScript(string scriptPath, IEnumerable<DurationDefinition

foreach (var signal in signals)
{
string instanceName;
legacyInstanceNameMap.TryGetValue(signal.Name, out instanceName);
legacyInstanceNameMap.TryGetValue(signal.Name, out string instanceName);

var signalDefinition = $@"New-Object System.Diagnostics.CounterCreationData ""{instanceName ?? signal.Name}"", ""{signal.Description}"", RateOfCountsPerSecond32";
stringBuilder.AppendLine(signalDefinition.PadLeft(signalDefinition.Length + 8));
Expand Down