diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/CoreWCFPerfService.csproj b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/CoreWCFPerfService.csproj
new file mode 100644
index 00000000000..a0d6786fe3f
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/CoreWCFPerfService.csproj
@@ -0,0 +1,24 @@
+
+
+
+ Exe
+ net6.0;net7.0
+
+
+
+
+ tlbimp
+ 0
+ 1
+ 58fbcf7c-e7a9-467c-80b3-fc65e8fcca08
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/FirewallRulesManager.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/FirewallRulesManager.cs
new file mode 100644
index 00000000000..9a596a3b00c
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/FirewallRulesManager.cs
@@ -0,0 +1,184 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using NetFwTypeLib;
+
+namespace CoreWCFPerfService
+{
+ public static class FirewallRulesManager
+ {
+ // This prefix is used both to name rules and to discover existing
+ // rules created by this class, so it must be unique
+ private static string s_RuleNamePrefix = "WCF perf test rule";
+ private static object s_portLock = new object();
+ private static bool s_registeredForProcessExit = false;
+ private static INetFwPolicy2 s_netFwPolicy2;
+ private static string s_remoteAddresses = "*";
+
+ private static INetFwPolicy2 NetFwPolicy2
+ {
+ get
+ {
+ lock (s_portLock)
+ {
+ if (s_netFwPolicy2 == null)
+ {
+ Type netFwPolicy2Type = Type.GetTypeFromProgID("HNetCfg.FwPolicy2", false);
+ s_netFwPolicy2 = (INetFwPolicy2)Activator.CreateInstance(netFwPolicy2Type);
+ }
+ }
+
+ return s_netFwPolicy2;
+ }
+ }
+
+ private static string RemoteAddresses
+ {
+ get
+ {
+ return s_remoteAddresses;
+ }
+ set
+ {
+ s_remoteAddresses = value;
+ }
+ }
+
+ private static string RuleNamePrefix { get; set; }
+
+ private static string ApplicationName { get; set; }
+
+ // We listen for ProcessExit so we can delete the firewall rules we added.
+ private static void RegisterForProcessExit()
+ {
+ lock (s_portLock)
+ {
+ if (!s_registeredForProcessExit)
+ {
+ AppDomain.CurrentDomain.ProcessExit += (s, e) =>
+ {
+ RemoveAllBridgeFirewallRules(RuleNamePrefix);
+ };
+ s_registeredForProcessExit = true;
+ }
+ }
+ }
+
+ // Searches all existing firewall rules with the given name
+ public static INetFwRule FindRule(string name, string port)
+ {
+ lock (s_portLock)
+ {
+ // Match on our special naming pattern and port
+ HashSet ruleSet = new HashSet();
+ foreach (var r in NetFwPolicy2.Rules)
+ {
+ INetFwRule rule = (INetFwRule)r;
+
+ if (string.Equals(name, rule.Name, StringComparison.OrdinalIgnoreCase) &&
+ string.Equals(rule.LocalPorts, port, StringComparison.Ordinal))
+ {
+ return rule;
+ }
+ }
+
+ return null;
+ }
+ }
+
+ private static void AddFirewallRule(string port)
+ {
+ lock (s_portLock)
+ {
+ // If we add any rules, register to delete them at process exit.
+ RegisterForProcessExit();
+
+ // If we already created this rule, we don't create it again.
+ string ruleName = string.Format("{0} {1}", RuleNamePrefix ?? s_RuleNamePrefix, port);
+ if (FindRule(ruleName, port) != null)
+ {
+ return;
+ }
+
+ INetFwRules rulesObject = NetFwPolicy2.Rules;
+ int currentProfiles = NetFwPolicy2.CurrentProfileTypes;
+
+ // Create a Rule Object.
+ Type netFwRuleType = Type.GetTypeFromProgID("HNetCfg.FWRule", false);
+ INetFwRule newRule = (INetFwRule)Activator.CreateInstance(netFwRuleType);
+
+ try
+ {
+ newRule.Name = ruleName;
+ newRule.ApplicationName = ApplicationName;
+ newRule.Description = string.Format("Rule added for WCF perf test use of port {0}", port);
+ newRule.Protocol = (int)NET_FW_IP_PROTOCOL_.NET_FW_IP_PROTOCOL_TCP;
+ newRule.LocalPorts = port;
+ newRule.Direction = NET_FW_RULE_DIRECTION_.NET_FW_RULE_DIR_IN;
+ newRule.Enabled = true;
+ newRule.Profiles = currentProfiles;
+ newRule.Action = NET_FW_ACTION_.NET_FW_ACTION_ALLOW;
+ newRule.RemoteAddresses = RemoteAddresses;
+
+ // Add a new rule
+ rulesObject.Add(newRule);
+
+ Trace.WriteLine(string.Format("Added firewall rule {0}", newRule.Name),
+ typeof(FirewallRulesManager).Name);
+ }
+ catch (Exception ex)
+ {
+ string message = string.Format("Failed to add firewall rule name:{0}, port:{1}, remoteAddresses:{2}{3}{4}",
+ newRule.Name, port, RemoteAddresses, Environment.NewLine, ex.ToString());
+ Console.WriteLine(message);
+ Trace.TraceWarning(message);
+ }
+ }
+ }
+
+ public static void RemoveAllBridgeFirewallRules(string preName)
+ {
+ RuleNamePrefix = preName;
+ lock (s_portLock)
+ {
+ // Capture The specific rules into local list so we
+ // don't mutate the rule list during enumeration.
+ HashSet ruleSet = new HashSet();
+ foreach (var r in NetFwPolicy2.Rules)
+ {
+ INetFwRule rule = (INetFwRule)r;
+ string ruleName = rule.Name;
+ if (rule.Name.StartsWith(RuleNamePrefix, StringComparison.Ordinal) && !ruleSet.Contains(rule.Name))
+ {
+ ruleSet.Add(rule.Name);
+ }
+ }
+
+ foreach (string ruleName in ruleSet)
+ {
+ try
+ {
+ NetFwPolicy2.Rules.Remove(ruleName);
+ Console.WriteLine("Removed firewall rule '{0}'", ruleName);
+ }
+ catch (FileNotFoundException fnfe)
+ {
+ // This exception can happen when multiple processes
+ // are cleaning up the rules, and the rule has already
+ // been removed.
+ Console.WriteLine("Unable to remove rule '{0}' : {1}",
+ ruleName, fnfe.Message);
+ }
+ }
+ }
+ }
+
+ public static void OpenPortInFirewall(string preName, string appName, string port)
+ {
+ RuleNamePrefix = preName;
+ ApplicationName = appName;
+ AddFirewallRule(port);
+ }
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/ISayHello.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/ISayHello.cs
new file mode 100644
index 00000000000..4c63fddfd66
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/ISayHello.cs
@@ -0,0 +1,12 @@
+using System.Threading.Tasks;
+using CoreWCF;
+
+namespace WCFCorePerfService
+{
+ [ServiceContract]
+ public interface ISayHello
+ {
+ [OperationContract]
+ Task HelloAsync(string name);
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/MyCustomValidator.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/MyCustomValidator.cs
new file mode 100644
index 00000000000..89cc4e87662
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/MyCustomValidator.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Threading.Tasks;
+using CoreWCF.IdentityModel.Selectors;
+
+namespace WCFCorePerfService
+{
+ public class MyCustomValidator : UserNamePasswordValidator
+ {
+ public override ValueTask ValidateAsync(string userName, string password)
+ {
+ if (!string.IsNullOrEmpty(userName) && !string.IsNullOrEmpty(password))
+ {
+ return default;
+ }
+ return new ValueTask(Task.FromException(new Exception("username and password cannot be empty")));
+ }
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/Program.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/Program.cs
new file mode 100644
index 00000000000..3589c62219d
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/Program.cs
@@ -0,0 +1,86 @@
+using System;
+using System.IO;
+using System.Net;
+using System.Reflection;
+using CoreWCF;
+using CoreWCF.Configuration;
+using CoreWCFPerfService;
+using Microsoft.AspNetCore;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace WCFCorePerfService
+{
+ public class Program
+ {
+ static void Main(string[] args)
+ {
+ string filePath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "CoreWCFPerfService.exe");
+ Console.WriteLine(filePath);
+
+ FirewallRulesManager.OpenPortInFirewall("CoreWCFPerfService", filePath, "8080,8443,8088");
+
+ Console.WriteLine("Application start.");
+
+ using (var host = CreateWebHostBuilder(args).Build())
+ {
+ host.Start();
+
+ Console.WriteLine("Service is Ready");
+ Console.WriteLine("Press Any Key to Terminate...");
+ Console.ReadLine();
+ }
+
+ Console.WriteLine("Clean up the firewall rule.");
+ FirewallRulesManager.RemoveAllBridgeFirewallRules("CoreWCFPerfService");
+ }
+
+ public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
+ WebHost.CreateDefaultBuilder(args)
+ .UseKestrel(options =>
+ {
+ options.ListenLocalhost(8080);
+ options.Listen(IPAddress.Loopback, 8443, listenOptions =>
+ {
+ listenOptions.UseHttps();
+ }
+ );
+ })
+ .UseNetTcp(8808)
+ .UseStartup();
+
+ public class Startup
+ {
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddServiceModelServices();
+ }
+
+ public void Configure(IApplicationBuilder app)
+ {
+ WSHttpBinding serverBinding = new WSHttpBinding(SecurityMode.TransportWithMessageCredential);
+ serverBinding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
+ app.UseServiceModel(builder =>
+ {
+ builder.AddService();
+ builder.AddServiceEndpoint(new BasicHttpBinding(), "/WCFCorePerf/TestService.svc/BasicHttp");
+ builder.AddServiceEndpoint(new NetTcpBinding(SecurityMode.None), "/WCFCorePerf/TestService.svc/NetTcp");
+ builder.AddServiceEndpoint(serverBinding, "/WCFCorePerf/TestService.svc/WSHttp");
+ Action serviceHost = host => ChangeHostBehavior(host);
+ builder.ConfigureServiceHostBase(serviceHost);
+ });
+ }
+
+ public void ChangeHostBehavior(ServiceHostBase host)
+ {
+ var srvCredentials = new CoreWCF.Description.ServiceCredentials();
+ srvCredentials.UserNameAuthentication.UserNamePasswordValidationMode
+ = CoreWCF.Security.UserNamePasswordValidationMode.Custom;
+ srvCredentials.UserNameAuthentication.CustomUserNamePasswordValidator
+ = new MyCustomValidator();
+ host.Description.Behaviors.Add(srvCredentials);
+ }
+ }
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/SayHello.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/SayHello.cs
new file mode 100644
index 00000000000..1795936670c
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/SayHello.cs
@@ -0,0 +1,12 @@
+using System.Threading.Tasks;
+
+namespace WCFCorePerfService
+{
+ public class SayHello : ISayHello
+ {
+ public Task HelloAsync(string name)
+ {
+ return Task.FromResult(name);
+ }
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/NuGet.config b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/NuGet.config
new file mode 100644
index 00000000000..b152cbb2762
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/NuGet.config
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerf.sln b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerf.sln
new file mode 100644
index 00000000000..6deb1d612be
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerf.sln
@@ -0,0 +1,31 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.3.32714.290
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CoreWCFPerfService", "CoreWCFPerfService\CoreWCFPerfService.csproj", "{35B05C6A-9FF0-4A9C-9BBE-E88963416022}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFCorePerfClient", "WCFCorePerfClient\WCFCorePerfClient.csproj", "{D9001454-F77C-4053-B4AE-34342351FD49}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {35B05C6A-9FF0-4A9C-9BBE-E88963416022}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {35B05C6A-9FF0-4A9C-9BBE-E88963416022}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {35B05C6A-9FF0-4A9C-9BBE-E88963416022}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {35B05C6A-9FF0-4A9C-9BBE-E88963416022}.Release|Any CPU.Build.0 = Release|Any CPU
+ {D9001454-F77C-4053-B4AE-34342351FD49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {D9001454-F77C-4053-B4AE-34342351FD49}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {D9001454-F77C-4053-B4AE-34342351FD49}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {D9001454-F77C-4053-B4AE-34342351FD49}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {BD5D3AEC-A9AB-412C-A41B-A410030B454A}
+ EndGlobalSection
+EndGlobal
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/ISayHello.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/ISayHello.cs
new file mode 100644
index 00000000000..0dc463a15e0
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/ISayHello.cs
@@ -0,0 +1,15 @@
+using System.ServiceModel;
+using System.Threading.Tasks;
+
+namespace WCFCorePerfClient
+{
+ [ServiceContract]
+ public interface ISayHello
+ {
+ [OperationContract]
+ Task HelloAsync(string name);
+
+ [OperationContract]
+ string Hello(string name);
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/Program.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/Program.cs
new file mode 100644
index 00000000000..d639d164d72
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/Program.cs
@@ -0,0 +1,262 @@
+using System;
+using System.Diagnostics;
+using System.Security.Cryptography.X509Certificates;
+using System.ServiceModel;
+using System.ServiceModel.Channels;
+using System.ServiceModel.Security;
+using System.Threading.Tasks;
+using Microsoft.Crank.EventSources;
+
+namespace WCFCorePerfClient
+{
+ public class Parameters
+ {
+ public const string Binding = "binding";
+ public const string ServiceUrl = "serviceurl";
+ public const string TransferMode = "transfermode";
+ public const string ReportingUrl = "reportingurl";
+ public const string PerfMeasurementDuration = "perfmeasurementduration";
+ }
+
+ public enum TestBinding { BasicHttp, WSHttp, NetTcp }
+
+ class Program
+ {
+ private TestBinding _paramBinding = TestBinding.BasicHttp;
+ private TimeSpan _paramPerfMeasurementDuration = s_defaultPerfMeasurementDuration;
+ private string _paramServiceUrl = "";
+ private readonly static TimeSpan s_defaultPerfMeasurementDuration = TimeSpan.FromSeconds(10);
+ private string _paramTransferMode = "Buffered";
+
+ static async Task Main(string[] args)
+ {
+ Console.WriteLine("WCFCorePerf Client.");
+
+ Program test = new Program();
+
+ if (test.ProcessRunOptions(args))
+ {
+ BenchmarksEventSource.Register("wcfcoreperf/channelopensync", Operations.Max, Operations.Max, "Channel Open Sync Time (ms)", "Time to Open Sync Channel in ms", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/firstsyncrequest", Operations.Max, Operations.Max, "First Sync Request (ms)", "Time to first sync request in ms", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/syncrequests", Operations.Max, Operations.Sum, "Sync Requests (" + test._paramPerfMeasurementDuration.TotalMilliseconds + " ms)", "Total number of syncrequests", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/rps/maxsync", Operations.Max, Operations.Sum, "Requests/sec (maxsync)", "Max sync requests per second", "n0");
+
+ BenchmarksEventSource.Register("wcfcoreperf/channelopenasync", Operations.Max, Operations.Max, "Channel Open Async Time (ms)", "Time to Open Async Channel in ms", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/firstasyncrequest", Operations.Max, Operations.Max, "First Async Request (ms)", "Time to first request in ms", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/asyncrequests", Operations.Max, Operations.Sum, "Async Requests (" + test._paramPerfMeasurementDuration.TotalMilliseconds + " ms)", "Total number of async requests", "n0");
+ BenchmarksEventSource.Register("wcfcoreperf/rps/maxasync", Operations.Max, Operations.Sum, "Requests/sec (maxasync)", "Max async requests per second", "n0");
+
+ var stopwatch = new Stopwatch();
+ stopwatch.Reset();
+ switch (test._paramBinding)
+ {
+ case TestBinding.BasicHttp:
+ BasicHttpBinding binding = new BasicHttpBinding();
+ switch (test._paramTransferMode.ToLower())
+ {
+ case "buffered":
+ binding.TransferMode = TransferMode.Buffered;
+ break;
+ case "streamed":
+ binding.TransferMode = TransferMode.Streamed;
+ break;
+ case "streamedrequest":
+ binding.TransferMode = TransferMode.StreamedRequest;
+ break;
+ case "streamedresponse":
+ binding.TransferMode = TransferMode.StreamedResponse;
+ break;
+ default:
+ break;
+ }
+
+ Console.WriteLine($"Testing TransferMode: {binding.TransferMode}");
+ var factory = await test.RunFirstChannelOpen(test._paramBinding, binding, true, test._paramServiceUrl, stopwatch);
+ await test.RunFirstChannelOpen(test._paramBinding, binding, false, test._paramServiceUrl, stopwatch);
+
+ var client = factory.CreateChannel();
+
+ await test.RunFirstIteration(client, true, stopwatch);
+ await test.RunFirstIteration(client, false, stopwatch);
+
+ await test.RunMaxThroughput(client, true, test._paramPerfMeasurementDuration);
+ await test.RunMaxThroughput(client, false, test._paramPerfMeasurementDuration);
+
+ break;
+ case TestBinding.WSHttp:
+ WSHttpBinding wsHttpBinding = new WSHttpBinding(SecurityMode.TransportWithMessageCredential);
+ wsHttpBinding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
+
+ var wsHttpFactory = await test.RunFirstChannelOpen(test._paramBinding, wsHttpBinding, true, test._paramServiceUrl, stopwatch);
+ await test.RunFirstChannelOpen(test._paramBinding, wsHttpBinding, false, test._paramServiceUrl, stopwatch);
+
+ var clientWSHttp = wsHttpFactory.CreateChannel();
+
+ await test.RunFirstIteration(clientWSHttp, true, stopwatch);
+ await test.RunFirstIteration(clientWSHttp, false, stopwatch);
+
+ await test.RunMaxThroughput(clientWSHttp, true, test._paramPerfMeasurementDuration);
+ await test.RunMaxThroughput(clientWSHttp, false, test._paramPerfMeasurementDuration);
+ break;
+ case TestBinding.NetTcp:
+ NetTcpBinding netTcpBinding = new NetTcpBinding(SecurityMode.None);
+ netTcpBinding.SendTimeout = TimeSpan.FromSeconds(300);
+ netTcpBinding.ReceiveTimeout = TimeSpan.FromSeconds(300);
+ var netTcpFactory = await test.RunFirstChannelOpen(test._paramBinding, netTcpBinding, true, test._paramServiceUrl, stopwatch);
+ await test.RunFirstChannelOpen(test._paramBinding, netTcpBinding, false, test._paramServiceUrl, stopwatch);
+
+ var clientNetTcp = netTcpFactory.CreateChannel();
+
+ await test.RunFirstIteration(clientNetTcp, true, stopwatch);
+ await test.RunMaxThroughput(clientNetTcp, true, test._paramPerfMeasurementDuration);
+
+ await test.RunFirstIteration(clientNetTcp, false, stopwatch);
+ await test.RunMaxThroughput(clientNetTcp, false, test._paramPerfMeasurementDuration);
+ break;
+ }
+ }
+ }
+
+ private ChannelFactory GetChannelFactory(TestBinding testBinding, Binding binding, string address)
+ {
+ ChannelFactory factory = null;
+ switch (testBinding)
+ {
+ case TestBinding.BasicHttp:
+ case TestBinding.NetTcp:
+ factory = new ChannelFactory(binding, new EndpointAddress(address));
+ break;
+ case TestBinding.WSHttp:
+ factory = new ChannelFactory(binding, new EndpointAddress(address));
+ factory.Credentials.ServiceCertificate.SslCertificateAuthentication = new X509ServiceCertificateAuthentication
+ {
+ CertificateValidationMode = X509CertificateValidationMode.None,
+ RevocationMode = X509RevocationMode.NoCheck
+ };
+ factory.Credentials.UserName.UserName = "abc";
+ factory.Credentials.UserName.Password = "[PLACEHOLDER]";
+ break;
+ }
+
+ return factory;
+ }
+
+ private async Task RunMaxThroughput(ISayHello client, bool sync, TimeSpan time)
+ {
+ DateTime iterationStartTime, iterationEndTime, iterationDurationTime;
+ int request = 0;
+ iterationStartTime = DateTime.Now;
+ iterationDurationTime = iterationStartTime.Add(time);
+ while (DateTime.Now <= iterationDurationTime)
+ {
+ if (sync)
+ {
+ Console.WriteLine($"Get sync result:{client.Hello("helloworld")}");
+ }
+ else
+ {
+ Console.WriteLine($"Get async result:{await client.HelloAsync("helloworld")}");
+ }
+ request++;
+ }
+
+ iterationEndTime = DateTime.Now;
+ if (sync)
+ {
+ BenchmarksEventSource.Measure("wcfcoreperf/syncrequests", request);
+ BenchmarksEventSource.Measure("wcfcoreperf/rps/maxsync", request / (iterationEndTime - iterationStartTime).TotalSeconds);
+ }
+ else
+ {
+ BenchmarksEventSource.Measure("wcfcoreperf/asyncrequests", request);
+ BenchmarksEventSource.Measure("wcfcoreperf/rps/maxasync", request / (iterationEndTime - iterationStartTime).TotalSeconds);
+ }
+ }
+
+ private async Task RunFirstIteration(ISayHello client, bool sync, Stopwatch stopwatch)
+ {
+ stopwatch.Restart();
+ if (sync)
+ {
+ Console.WriteLine($"Get the first sync request: {client.Hello("helloworld")}");
+ BenchmarksEventSource.Measure("wcfcoreperf/firstsyncrequest", stopwatch.ElapsedMilliseconds);
+ }
+ else
+ {
+ Console.WriteLine($"Get the first async request: {await client.HelloAsync("helloworld")}");
+ BenchmarksEventSource.Measure("wcfcoreperf/firstasyncrequest", stopwatch.ElapsedMilliseconds);
+ }
+ }
+
+ private async Task> RunFirstChannelOpen(TestBinding testbinding, Binding binding, bool sync, string address, Stopwatch stopwatch)
+ {
+ stopwatch.Restart();
+ ChannelFactory factory = null;
+ if (sync)
+ {
+ factory = GetChannelFactory(testbinding, binding, address);
+ factory.Open();
+ BenchmarksEventSource.Measure("wcfcoreperf/channelopensync", stopwatch.ElapsedMilliseconds);
+ }
+ else
+ {
+ factory = GetChannelFactory(testbinding, binding, address);
+ await Task.Factory.FromAsync(factory.BeginOpen, factory.EndClose, null);
+ BenchmarksEventSource.Measure("wcfcoreperf/channelopenasync", stopwatch.ElapsedMilliseconds);
+ }
+
+ return factory;
+ }
+
+ private bool ProcessRunOptions(string[] args)
+ {
+ foreach (string s in args)
+ {
+ Console.WriteLine(s);
+ string[] p = s.Split(new char[] { ':' }, count: 2);
+ if (p.Length != 2)
+ {
+ continue;
+ }
+
+ switch (p[0].ToLower())
+ {
+ case Parameters.Binding:
+ if (!Enum.TryParse(p[1], ignoreCase: true, result: out _paramBinding))
+ {
+ return ReportWrongArgument(s);
+ }
+ break;
+
+ case Parameters.PerfMeasurementDuration:
+ int perfPerfMeasurementDurationSeconds = 0;
+ if (!Int32.TryParse(p[1], out perfPerfMeasurementDurationSeconds))
+ {
+ return ReportWrongArgument(s);
+ }
+ _paramPerfMeasurementDuration = TimeSpan.FromSeconds(perfPerfMeasurementDurationSeconds);
+ break;
+
+ case Parameters.ServiceUrl:
+ _paramServiceUrl = p[1];
+ break;
+
+ case Parameters.TransferMode:
+ _paramTransferMode = p[1];
+ break;
+ default:
+ Console.WriteLine("unknown argument: " + s);
+ continue;
+ }
+ }
+
+ return true;
+ }
+
+ private bool ReportWrongArgument(string arg)
+ {
+ Console.WriteLine("Wrong parameter: " + arg);
+ return false;
+ }
+ }
+}
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
new file mode 100644
index 00000000000..f887b5e2ccf
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
@@ -0,0 +1,16 @@
+
+
+
+ Exe
+ net6.0;net7.0
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/benchmarks.wcfcore.Perf.yml b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/benchmarks.wcfcore.Perf.yml
new file mode 100644
index 00000000000..ded61d26724
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/benchmarks.wcfcore.Perf.yml
@@ -0,0 +1,474 @@
+jobs:
+ WCFCorePerf:
+ source:
+ repository: https://github.com/dotnet/wcf.git
+ branchOrCommit: main
+ project: src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
+ isConsoleApp: true
+ waitForExit: true
+ variables:
+ Duration: 300
+ arguments: " binding:{{Binding}} serviceurl:{{Protocol}}://{{serverAddress}}:{{serverPort}}/WCFCorePerf/TestService.svc/{{EndpointAddress}} transfermode:{{TransferMode}} perfmeasurementduration:{{Duration}} "
+ WCFCorePerfService:
+ source:
+ repository: https://github.com/dotnet/wcf.git
+ branchOrCommit: main
+ project: src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingCoreWCFService/CoreWCFPerfService/CoreWCFPerfService.csproj
+ isConsoleApp: true
+
+
+scenarios:
+ BasicHttpWithBuffered:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Http
+ EndpointAddress: BasicHttp
+ Binding: BasicHttp
+ TransferMode: Buffered
+ serverPort: 8080
+ BasicHttpWithDefault:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Http
+ EndpointAddress: BasicHttp
+ Binding: BasicHttp
+ TransferMode: Default
+ serverPort: 8080
+ WSHttp:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Https
+ EndpointAddress: WSHttp
+ Binding: WSHttp
+ serverPort: 8443
+ NetTcp:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: net.tcp
+ EndpointAddress: NetTcp
+ Binding: NetTcp
+ serverPort: 8808
+
+profiles:
+ short:
+ variables:
+ warmup: 3
+ duration: 7
+
+ pgo:
+ jobs:
+ application:
+ environmentVariables:
+ - DOTNET_TieredPGO: 1
+ - DOTNET_TC_QuickJitForLoops: 1
+ - DOTNET_ReadyToRun: 0
+
+ local:
+ variables:
+ serverAddress: localhost
+ jobs:
+ db:
+ endpoints:
+ - http://localhost:5010
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://localhost:5010
+ variables:
+ databaseServer: localhost
+ load:
+ endpoints:
+ - http://localhost:5010
+ aliases:
+ - warmup
+
+ aspnet-citrine-lin:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-lin:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-lin-relay:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinelin
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-win:
+ variables:
+ serverAddress: 10.0.0.104
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-win:5001
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-win-relay:
+ variables:
+ serverAddress: 10.0.0.104
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinewin
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - warmup
+
+ aspnet-citrine-win2:
+ variables:
+ serverAddress: 10.0.0.101
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-win2:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-win-relay:
+ variables:
+ serverAddress: 10.0.0.101
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinewin2
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm:
+ variables:
+ serverAddress: 10.0.0.107
+ cores: 32
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-arm:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-relay:
+ variables:
+ serverAddress: 10.0.0.107
+ cores: 32
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinearm
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-ampere:
+ variables:
+ serverAddress: 10.0.0.108
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-lin:
+ variables:
+ serverAddress: 10.0.0.108
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-win:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://10.240.177.200:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd2:
+ variables:
+ serverAddress: 10.0.0.109
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ variables:
+ databaseServer: 10.0.0.108
+ load:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd:
+ variables:
+ serverAddress: 10.0.0.106
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd-relay:
+ variables:
+ serverAddress: 10.0.0.106
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineamd
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - warmup
+
+ aspnet-perf-lin:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - http://asp-perf-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-perf-lin:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-perf-load:5001
+ aliases:
+ - warmup
+
+ aspnet-perf-lin-relay:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfdb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perflin
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfload
+ aliases:
+ - warmup
+
+ aspnet-perf-win:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - http://asp-perf-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-perf-win:5001
+ variables:
+ databaseServer: 10.0.0.104
+ load:
+ endpoints:
+ - http://asp-perf-db:5001
+ aliases:
+ - warmup
+
+ aspnet-perf-win-relay:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfwin
+ variables:
+ databaseServer: 10.0.0.104
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfsb
+ aliases:
+ - warmup
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/WCFCorePerfService.csproj b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/NetfxWCFPerfService.csproj
similarity index 65%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/WCFCorePerfService.csproj
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/NetfxWCFPerfService.csproj
index 8a147311663..120e38c3150 100644
--- a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/WCFCorePerfService.csproj
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/NetfxWCFPerfService.csproj
@@ -2,7 +2,7 @@
Exe
- net5.0;netcoreapp3.1
+ net7.0
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/Program.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/Program.cs
similarity index 100%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/Program.cs
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/Program.cs
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf.sln b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerf.sln
similarity index 83%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf.sln
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerf.sln
index a63a093dcb8..391590c4341 100644
--- a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf.sln
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerf.sln
@@ -3,9 +3,9 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30323.103
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WCFCorePerf", "WCFCorePerf\WCFCorePerf.csproj", "{57DAD894-E349-43FD-9A55-0924F9F5D31A}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WCFCorePerfClient", "WCFCorePerfClient\WCFCorePerfClient.csproj", "{57DAD894-E349-43FD-9A55-0924F9F5D31A}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WCFCorePerfService", "WCFCorePerfService\WCFCorePerfService.csproj", "{BEB8FF58-A77B-4F14-BB4F-A07C0BED0227}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NetfxWCFPerfService", "NetfxWCFPerfService\NetfxWCFPerfService.csproj", "{BEB8FF58-A77B-4F14-BB4F-A07C0BED0227}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/ClientContracts.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/ClientContracts.cs
similarity index 100%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/ClientContracts.cs
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/ClientContracts.cs
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/Program.cs b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/Program.cs
similarity index 100%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/Program.cs
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/Program.cs
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/WCFCorePerf.csproj b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
similarity index 80%
rename from src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/WCFCorePerf.csproj
rename to src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
index 40da6011173..9cbd7338696 100644
--- a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/WCFCorePerf.csproj
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
@@ -2,15 +2,15 @@
Exe
- net5.0;netcoreapp3.1
+ net7.0
-
-
-
-
+
+
+
+
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/benchmarks.wcfcore.Perf.yml b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/benchmarks.wcfcore.Perf.yml
new file mode 100644
index 00000000000..b0f7c6d8ba6
--- /dev/null
+++ b/src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/benchmarks.wcfcore.Perf.yml
@@ -0,0 +1,475 @@
+jobs:
+ WCFCorePerf:
+ source:
+ repository: https://github.com/dotnet/wcf.git
+ branchOrCommit: main
+ project: src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/WCFCorePerfClient/WCFCorePerfClient.csproj
+ isConsoleApp: true
+ waitForExit: true
+ variables:
+ Duration: 300
+ arguments: " binding:{{Binding}} serviceurl:{{Protocol}}://{{serverAddress}}{% if Binding == 'WSHttp' %}:{{serverPort}}{% endif %}/WCFCorePerf/TestService.svc/{{EndpointAddress}} transfermode:{{TransferMode}} perfmeasurementduration:{{Duration}} "
+ WCFCorePerfService:
+ source:
+ repository: https://github.com/dotnet/wcf.git
+ branchOrCommit: main
+ project: src/System.Private.ServiceModel/tests/Benchmarks/PerfUsingNetfxWCFService/NetfxWCFPerfService/NetfxWCFPerfService.csproj
+ arguments: " port:{{serverPort}}"
+ isConsoleApp: true
+
+
+scenarios:
+ BasicHttpWithBuffered:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Http
+ EndpointAddress: BasicHttp
+ Binding: BasicHttp
+ TransferMode: Buffered
+ serverPort: 5000
+ BasicHttpWithDefault:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Http
+ EndpointAddress: BasicHttp
+ Binding: BasicHttp
+ TransferMode: Default
+ serverPort: 5000
+ WSHttp:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: Https
+ EndpointAddress: WSHttp
+ Binding: WSHttp
+ serverPort: 5000
+ NetTcp:
+ application:
+ job: WCFCorePerfService
+ load:
+ job: WCFCorePerf
+ variables:
+ Protocol: net.tcp
+ EndpointAddress: NetTcp
+ Binding: NetTcp
+ serverPort: 5000
+
+profiles:
+ short:
+ variables:
+ warmup: 3
+ duration: 7
+
+ pgo:
+ jobs:
+ application:
+ environmentVariables:
+ - DOTNET_TieredPGO: 1
+ - DOTNET_TC_QuickJitForLoops: 1
+ - DOTNET_ReadyToRun: 0
+
+ local:
+ variables:
+ serverAddress: localhost
+ jobs:
+ db:
+ endpoints:
+ - http://localhost:5010
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://localhost:5010
+ variables:
+ databaseServer: localhost
+ load:
+ endpoints:
+ - http://localhost:5010
+ aliases:
+ - warmup
+
+ aspnet-citrine-lin:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-lin:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-lin-relay:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinelin
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-win:
+ variables:
+ serverAddress: 10.0.0.104
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-win:5001
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-win-relay:
+ variables:
+ serverAddress: 10.0.0.104
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinewin
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - warmup
+
+ aspnet-citrine-win2:
+ variables:
+ serverAddress: 10.0.0.101
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-win2:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-win-relay:
+ variables:
+ serverAddress: 10.0.0.101
+ cores: 28
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinewin2
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm:
+ variables:
+ serverAddress: 10.0.0.107
+ cores: 32
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-arm:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-relay:
+ variables:
+ serverAddress: 10.0.0.107
+ cores: 32
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinearm
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - warmup
+
+ aspnet-citrine-ampere:
+ variables:
+ serverAddress: 10.0.0.108
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-lin:
+ variables:
+ serverAddress: 10.0.0.108
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-arm-win:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 80
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://10.240.177.200:5001
+ variables:
+ databaseServer: 10.0.0.109
+ load:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd2:
+ variables:
+ serverAddress: 10.0.0.109
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-amd2:5001
+ variables:
+ databaseServer: 10.0.0.108
+ load:
+ endpoints:
+ - http://asp-citrine-ampere:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd:
+ variables:
+ serverAddress: 10.0.0.106
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - http://asp-citrine-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-citrine-amd:5001
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - http://asp-citrine-db:5001
+ aliases:
+ - warmup
+
+ aspnet-citrine-amd-relay:
+ variables:
+ serverAddress: 10.0.0.106
+ cores: 48
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrineamd
+ variables:
+ databaseServer: 10.0.0.105
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/citrinedb
+ aliases:
+ - warmup
+
+ aspnet-perf-lin:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - http://asp-perf-db:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-perf-lin:5001
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - http://asp-perf-load:5001
+ aliases:
+ - warmup
+
+ aspnet-perf-lin-relay:
+ variables:
+ serverAddress: 10.0.0.102
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfdb
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perflin
+ variables:
+ databaseServer: 10.0.0.103
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfload
+ aliases:
+ - warmup
+
+ aspnet-perf-win:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - http://asp-perf-load:5001
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - http://asp-perf-win:5001
+ variables:
+ databaseServer: 10.0.0.104
+ load:
+ endpoints:
+ - http://asp-perf-db:5001
+ aliases:
+ - warmup
+
+ aspnet-perf-win-relay:
+ variables:
+ serverAddress: 10.0.0.110
+ cores: 12
+ jobs:
+ db:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfload
+ aliases:
+ - downstream
+ application:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfwin
+ variables:
+ databaseServer: 10.0.0.104
+ load:
+ endpoints:
+ - https://aspnetperf.servicebus.windows.net/perfsb
+ aliases:
+ - warmup
diff --git a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/benchmarks.wcfcore.Perf.yml b/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/benchmarks.wcfcore.Perf.yml
deleted file mode 100644
index 1399c1430c3..00000000000
--- a/src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/benchmarks.wcfcore.Perf.yml
+++ /dev/null
@@ -1,180 +0,0 @@
-jobs:
- WCFCorePerf:
- source:
- repository: https://github.com/dotnet/wcf.git
- branchOrCommit: master
- project: src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerf/WCFCorePerf.csproj
- isConsoleApp: true
- waitForExit: true
- variables:
- Duration: 300
- arguments: " binding:{{Binding}} serviceurl:{{Protocol}}://{{serverAddress}}{% if Binding == 'WSHttp' %}:{{serverPort}}{% endif %}/WCFCorePerf/TestService.svc/{{EndpointAddress}} transfermode:{{TransferMode}} perfmeasurementduration:{{Duration}} "
- WCFCorePerfService:
- source:
- repository: https://github.com/dotnet/wcf.git
- branchOrCommit: master
- project: src/System.Private.ServiceModel/tests/Benchmarks/WCFCorePerf/WCFCorePerfService/WCFCorePerfService.csproj
- arguments: " port:{{serverPort}}"
- isConsoleApp: true
-
-
-scenarios:
- BasicHttpWithBuffered:
- application:
- job: WCFCorePerfService
- load:
- job: WCFCorePerf
- variables:
- Protocol: Http
- EndpointAddress: BasicHttp
- Binding: BasicHttp
- TransferMode: Buffered
- BasicHttpWithDefault:
- application:
- job: WCFCorePerfService
- load:
- job: WCFCorePerf
- variables:
- Protocol: Http
- EndpointAddress: BasicHttp
- Binding: BasicHttp
- TransferMode: Default
- WSHttp:
- application:
- job: WCFCorePerfService
- load:
- job: WCFCorePerf
- variables:
- Protocol: Https
- EndpointAddress: WSHttp
- Binding: WSHttp
- NetTcp:
- application:
- job: WCFCorePerfService
- load:
- job: WCFCorePerf
- variables:
- Protocol: net.tcp
- EndpointAddress: NetTcp
- Binding: NetTcp
-
-profiles:
- local:
- variables:
- serverAddress: localhost
- serverPort: 5000
- jobs:
- application:
- endpoints:
- - http://localhost:5010
- load:
- endpoints:
- - http://localhost:5010
-
- aspnet-citrine-lin:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.102
- cores: 28
- jobs:
- db:
- endpoints:
- - http://asp-citrine-db:5001
- application:
- endpoints:
- - http://asp-citrine-lin:5001
- variables:
- databaseServer: 10.0.0.103
- load:
- endpoints:
- - http://asp-citrine-load:5001
-
- aspnet-citrine-win:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.104
- cores: 28
- jobs:
- db:
- endpoints:
- - http://asp-citrine-load:5001
- application:
- endpoints:
- - http://asp-citrine-win:5001
- variables:
- databaseServer: 10.0.0.105
- load:
- endpoints:
- - http://asp-citrine-db:5001
-
- aspnet-citrine-arm:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.107
- cores: 32
- jobs:
- db:
- endpoints:
- - http://asp-citrine-db:5001
- application:
- endpoints:
- - http://asp-citrine-arm:5001
- variables:
- databaseServer: 10.0.0.103
- load:
- endpoints:
- - http://asp-citrine-load:5001
-
- aspnet-citrine-amd:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.106
- cores: 48
- jobs:
- db:
- endpoints:
- - http://asp-citrine-load:5001
- application:
- endpoints:
- - http://asp-citrine-amd:5001
- variables:
- databaseServer: 10.0.0.105
- load:
- endpoints:
- - http://asp-citrine-db:5001
-
- aspnet-perf-lin:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.102
- cores: 12
- jobs:
- db:
- endpoints:
- - http://asp-perf-db:5001
- application:
- endpoints:
- - http://asp-perf-lin:5001
- variables:
- databaseServer: 10.0.0.103
- load:
- endpoints:
- - http://asp-perf-load:5001
-
- aspnet-perf-win:
- variables:
- serverPort: 5000
- serverAddress: 10.0.0.110
- cores: 12
- jobs:
- db:
- endpoints:
- - http://asp-perf-load:5001
- application:
- endpoints:
- - http://asp-perf-win:5001
- variables:
- databaseServer: 10.0.0.104
- load:
- endpoints:
- - http://asp-perf-db:5001