Skip to content

Commit

Permalink
fixed the build of SuperSocket.Benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Mar 11, 2024
1 parent ba8983c commit 06e4cac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions test/SuperSocket.Benchmarks/CurrentSend.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Threading.Tasks;
using BenchmarkDotNet;
using BenchmarkDotNet.Attributes;
using SuperSocket.Channel;
using SuperSocket.Connection;
using SuperSocket.ProtoBase;

namespace SuperSocket.Benchmarks
Expand All @@ -27,15 +27,15 @@ public async Task SendTest()

for (var i = 0; i < ConcurrentLevel; i++)
{
tasks[i] = Send(pool, new ChannelOptions(), Iteration);
tasks[i] = Send(pool, new ConnectionOptions(), Iteration);
}

await Task.WhenAll(tasks);
}

private async Task Send(ArrayPool<byte> pool, ChannelOptions options, int iteration)
private async Task Send(ArrayPool<byte> pool, ConnectionOptions options, int iteration)
{
var channel = new TransparentPipeChannel<StringPackageInfo>(new CommandLinePipelineFilter(), options);
var channel = new TransparentPipeConnection<StringPackageInfo>(new CommandLinePipelineFilter(), options);
channel.Start();

for (var i = 0; i < iteration; i++)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
using System.Buffers;
using System.Threading;
using System.Threading.Tasks;
using SuperSocket.Channel;
using SuperSocket.Connection;
using SuperSocket.ProtoBase;

namespace SuperSocket.Benchmarks
{
public class TransparentPipeChannel<TPackageInfo> : PipeChannel<TPackageInfo>
public class TransparentPipeConnection<TPackageInfo> : PipeConnection<TPackageInfo>
{
private TaskCompletionSource<int> _tcs;
private Task<int> _channelTask;

public TransparentPipeChannel(IPipelineFilter<TPackageInfo> pipelineFilter, ChannelOptions options)
public TransparentPipeConnection(IPipelineFilter<TPackageInfo> pipelineFilter, ConnectionOptions options)
: base(pipelineFilter, options)
{
_tcs = new TaskCompletionSource<int>();
Expand Down

0 comments on commit 06e4cac

Please sign in to comment.