Skip to content

Loading…

Add input argument to define TableCount for SqlMessageBusRun in Stress #2932

Merged
merged 1 commit into from

2 participants

@Xiaohongt
SignalR member
@davidfowl
SignalR member

Looks good.

@Xiaohongt Xiaohongt merged commit e8be944 into release
@Xiaohongt Xiaohongt deleted the 2931 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
View
2 src/Microsoft.AspNet.SignalR.Stress/Performance/SqlMessageBusRun.cs
@@ -18,7 +18,7 @@ public SqlMessageBusRun(RunData runData)
protected override MessageBus CreateMessageBus()
{
- var config = new SqlScaleoutConfiguration(RunData.SqlConnectionString) { TableCount = 1 };
+ var config = new SqlScaleoutConfiguration(RunData.SqlConnectionString) { TableCount = RunData.SqlTableCount };
return new SqlMessageBus(Resolver, config);
}
View
8 src/Microsoft.AspNet.SignalR.Stress/Program.cs
@@ -12,7 +12,7 @@
namespace Microsoft.AspNet.SignalR.Stress
{
class Program
- {
+ {
static void Main(string[] args)
{
IRun run = CreateRun();
@@ -32,7 +32,7 @@ static void Main(string[] args)
Console.WriteLine("After GC and before dispose {0}", Utility.FormatBytes(memory));
}
-
+
memory = GC.GetTotalMemory(forceFullCollection: true);
Console.WriteLine("After GC and dispose {0}", Utility.FormatBytes(memory));
@@ -81,6 +81,7 @@ private static IRun CreateRun()
RedisPassword = args.RedisPassword,
ServiceBusConnectionString = args.ServiceBusConnectionString,
SqlConnectionString = args.SqlConnectionString,
+ SqlTableCount = args.SqlTableCount,
});
return compositionContainer.GetExportedValue<IRun>(args.RunName);
@@ -144,6 +145,9 @@ private class StressArguments
[CommandLineParameter(Command = "SqlConnectionString", Required = false, Default = "Data Source=(local);Initial Catalog=SignalRSamples;Integrated Security=SSPI;MultipleActiveResultSets=true;Asynchronous Processing=True;", Description = "Warmup duration in seconds. Default: Local sql server")]
public string SqlConnectionString { get; set; }
+
+ [CommandLineParameter(Command = "SqlTableCount", Required = false, Default = 1, Description = "The number of tables to store messages in the SqlServer DB")]
+ public int SqlTableCount { get; set; }
}
}
}
View
3 src/Microsoft.AspNet.SignalR.Stress/RunData.cs
@@ -20,9 +20,10 @@ public class RunData
// Scaleout
public string RedisServer { get; set; }
public string RedisPassword { get; set; }
- public int RedisPort { get; set; }
+ public int RedisPort { get; set; }
public string SqlConnectionString { get; set; }
+ public int SqlTableCount { get; set; }
public string ServiceBusConnectionString { get; set; }
public int StreamCount { get; set; }
Something went wrong with that request. Please try again.