Skip to content

Commit 4491b93

Browse files
committed
updated protocol load test with thread count and memorysize info
1 parent 68e81b4 commit 4491b93

File tree

3 files changed

+16
-10
lines changed

3 files changed

+16
-10
lines changed

Diff for: src/Nest/Domain/Connection/Connection.cs

+1-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,7 @@ protected virtual Task<ConnectionStatus> DoAsyncRequest(HttpWebRequest request,
231231
}
232232
try
233233
{
234-
return Task.Factory.StartNew(
235-
() => this.CreateIterateTask(request, data, tcs).Result
236-
, TaskCreationOptions.LongRunning
237-
);
234+
return this.CreateIterateTask(request, data, tcs);
238235
}
239236
finally
240237
{

Diff for: src/Nest/Nest.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@
6868
<Reference Include="System.Windows.Forms" />
6969
</ItemGroup>
7070
<ItemGroup>
71+
<Compile Include="Domain\Connection\AsyncRequestOperation.cs" />
72+
<Compile Include="Domain\Connection\NoTasksHttpConnection.cs" />
7173
<Compile Include="RawElasticClient-Generated.cs" />
7274
<Compile Include="Extensions\StringInject.cs" />
7375
<Compile Include="RawElasticClient.cs" />
74-
<Compile Include="Domain\Connection\AsyncRequestOperation.cs" />
75-
<Compile Include="Domain\Connection\NoTasksHttpConnection.cs" />
7676
<Compile Include="Domain\Responses\IReindexResponse.cs" />
7777
<Compile Include="DSL\ReindexDescriptor.cs" />
7878
<Compile Include="Exception\ReindexException.cs" />

Diff for: src/ProtocolLoadTest/Program.cs

+13-4
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,24 @@ class Program
2121

2222
static void Main(string[] args)
2323
{
24+
var process = Process.GetCurrentProcess();
25+
26+
double notTaskRate = RunTest<TrueAsyncTester>(HTTP_PORT);
27+
var threadCountNoTasks = process.Threads.Count;
28+
var memorySizeNoTasks = process.VirtualMemorySize64;
29+
2430
double httpRate = RunTest<HttpTester>(HTTP_PORT);
25-
///double manualAsyncHttpRate = RunTest<HttpManualAsyncTester>(HTTP_PORT);
26-
double trueAsyncRate = RunTest<TrueAsyncTester>(HTTP_PORT);
31+
var threadCountHttp = process.Threads.Count;
32+
var memorySizeHttp = process.VirtualMemorySize64;
33+
2734
//double thriftRate = RunTest<ThriftTester>(THRIFT_PORT);
2835

2936
Console.WriteLine();
30-
Console.WriteLine("HTTP (IndexManyAsync): {0:0,0}/s", httpRate);
37+
Console.WriteLine("HTTP (IndexManyAsync): {0:0,0}/s {1} Threads {2} Virual memory"
38+
, httpRate, threadCountHttp, memorySizeHttp);
3139
//Console.WriteLine("HTTP (IndexMany wrapped TaskFactory.StartNew): {0:0,0}/s", manualAsyncHttpRate);
32-
Console.WriteLine("HTTP (IndexManyAsyc using TrueAsyncConnection): {0:0,0}/s", trueAsyncRate);
40+
Console.WriteLine("HTTP (IndexManyAsyc using NoTasksHttpConnection): {0:0,0}/s {1} Threads {2} Virual memory"
41+
, notTaskRate, threadCountNoTasks, memorySizeNoTasks);
3342
//Console.WriteLine("Thrift: {0:0,0}/s", thriftRate);
3443

3544
Console.ReadLine();

0 commit comments

Comments
 (0)