mirror of
https://github.com/esiur/esiur-dotnet.git
synced 2026-04-29 06:48:41 +00:00
400ms test
This commit is contained in:
@@ -23,7 +23,7 @@ Console.WriteLine($"[Client {clientId}] Connecting to {host}:{port}, resources={
|
|||||||
|
|
||||||
// Counters
|
// Counters
|
||||||
long totalReceived = 0;
|
long totalReceived = 0;
|
||||||
long lateCount = 0; // notifications arriving > 500ms after the previous
|
long lateCount = 0; // notifications arriving > 400ms after the previous
|
||||||
double sumLatencyMs = 0;
|
double sumLatencyMs = 0;
|
||||||
long latencySamples = 0;
|
long latencySamples = 0;
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ try
|
|||||||
{
|
{
|
||||||
sumLatencyMs += elapsedMs;
|
sumLatencyMs += elapsedMs;
|
||||||
latencySamples++;
|
latencySamples++;
|
||||||
if (elapsedMs > 500) lateCount++;
|
if (elapsedMs > 400) lateCount++;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -112,7 +112,7 @@ string csv = $"time_s,received_per_5s,rate_per_s,avg_interval_ms\n" +
|
|||||||
string outFile = $"client_{clientId}_results.csv";
|
string outFile = $"client_{clientId}_results.csv";
|
||||||
await File.WriteAllTextAsync(outFile, csv);
|
await File.WriteAllTextAsync(outFile, csv);
|
||||||
Console.WriteLine($"[Client {clientId}] Results written to {outFile}");
|
Console.WriteLine($"[Client {clientId}] Results written to {outFile}");
|
||||||
Console.WriteLine($"[Client {clientId}] Total received={totalReceived} late(>500ms)={lateCount}");
|
Console.WriteLine($"[Client {clientId}] Total received={totalReceived} late(>400ms)={lateCount}");
|
||||||
|
|
||||||
|
|
||||||
static string GetArg(string[] args, string key, string def)
|
static string GetArg(string[] args, string key, string def)
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
|
|
||||||
|
using Esiur.Data.Gvwie;
|
||||||
using Esiur.Tests.Gvwie;
|
using Esiur.Tests.Gvwie;
|
||||||
using MessagePack;
|
using MessagePack;
|
||||||
|
|
||||||
|
var e = GroupInt32Codec.Encode(new int[] {-12000, 15000, -1, 32760 });
|
||||||
|
|
||||||
MessagePack.MessagePackSerializer.DefaultOptions = MessagePackSerializerOptions.Standard
|
MessagePack.MessagePackSerializer.DefaultOptions = MessagePackSerializerOptions.Standard
|
||||||
.WithCompression(MessagePackCompression.None); // optional; remove if you want raw size
|
.WithCompression(MessagePackCompression.None); // optional; remove if you want raw size
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user