Skip to content

Commit d75fe20

Browse files
committed
fix compilation errors and temporarily disable dependency on #4202
1 parent 9d2bb38 commit d75fe20

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

src/Elasticsearch.Net/Providers/MemoryStreamFactory.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ namespace Elasticsearch.Net
77
/// </summary>
88
public class MemoryStreamFactory : IMemoryStreamFactory
99
{
10+
public static MemoryStreamFactory Default { get; } = new MemoryStreamFactory();
11+
1012
/// <inheritdoc />
1113
public MemoryStream Create() => new MemoryStream();
1214

src/Tests/Tests.Benchmarking/BulkBenchmarkTests.cs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ public class BulkBenchmarkTests
2121
.EnableHttpCompression(false)
2222
);
2323

24-
private static readonly IElasticClient ClientNoRecyclableMemory =
25-
new ElasticClient(new ConnectionSettings(new InMemoryConnection(Response, 200, null, null))
26-
.DefaultIndex("index")
27-
.EnableHttpCompression(false)
28-
.MemoryStreamFactory(MemoryStreamFactory.Default)
29-
);
24+
//TODO can uncomment when https://github.com/elastic/elasticsearch-net/pull/4202 lands
25+
// private static readonly IElasticClient ClientNoRecyclableMemory =
26+
// new ElasticClient(new ConnectionSettings(new InMemoryConnection(Response, 200, null, null))
27+
// .DefaultIndex("index")
28+
// .EnableHttpCompression(false)
29+
// .MemoryStreamFactory(MemoryStreamFactory.Default)
30+
// );
3031

3132
private static readonly Nest7.IElasticClient ClientV7 =
3233
new Nest7.ElasticClient(new Nest7.ConnectionSettings(
@@ -41,8 +42,8 @@ public void Setup() { }
4142
[Benchmark(Description = "PR")]
4243
public BulkResponse NestUpdatedBulk() => Client.Bulk(b => b.IndexMany(Projects));
4344

44-
[Benchmark(Description = "PR no recyclable")]
45-
public BulkResponse NoRecyclableMemory() => ClientNoRecyclableMemory.Bulk(b => b.IndexMany(Projects));
45+
// [Benchmark(Description = "PR no recyclable")]
46+
// public BulkResponse NoRecyclableMemory() => ClientNoRecyclableMemory.Bulk(b => b.IndexMany(Projects));
4647

4748
[Benchmark(Description = "7.x")]
4849
public Nest7.BulkResponse NestCurrentBulk() => ClientV7.Bulk(b => b.IndexMany(Projects));

0 commit comments

Comments
 (0)