Skip to content

Commit

Permalink
Target .net 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
paulpach committed Aug 14, 2018
1 parent b14c44f commit 84f1524
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion LoadTest/RunClients.cs
Expand Up @@ -57,6 +57,7 @@ public static void StartClients(string host, int port, int clientAmount)
// report every 10 seconds
if (stopwatch.ElapsedMilliseconds > 1000 * 10)
{

long bandwithIn = dataReceived * 1000 / (stopwatch.ElapsedMilliseconds * 1024);
long bandwithOut = messagesSent * messageBytes.Length * 1000 / (stopwatch.ElapsedMilliseconds * 1024);

Expand All @@ -65,7 +66,8 @@ public static void StartClients(string host, int port, int clientAmount)
bandwithIn,
messagesSent,
bandwithOut));
stopwatch.Restart();
stopwatch.Stop();
stopwatch = Stopwatch.StartNew();
messagesSent = 0;
dataReceived = 0;
messagesReceived = 0;
Expand Down
3 changes: 2 additions & 1 deletion LoadTest/RunServer.cs
Expand Up @@ -41,7 +41,8 @@ public static void StartServer(int port)
if (stopwatch.ElapsedMilliseconds > 1000 * 10)
{
Logger.Log(string.Format("Server in={0} ({1} KB/s) out={0} ({1} KB/s)", messagesReceived, (dataReceived * 1000 / (stopwatch.ElapsedMilliseconds * 1024))));
stopwatch.Restart();
stopwatch.Stop();
stopwatch = Stopwatch.StartNew();
messagesReceived = 0;
dataReceived = 0;
}
Expand Down

0 comments on commit 84f1524

Please sign in to comment.