Skip to content

Commit

Permalink
Jump on VS2019; fix BDN upgrade requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
nblumhardt committed Jun 7, 2019
1 parent d4b3b32 commit 91f7b81
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: '{build}'
skip_tags: true
image: Visual Studio 2017
image: Visual Studio 2019
build_script:
- ps: ./Build.ps1
test: off
Expand Down
6 changes: 3 additions & 3 deletions test/Serilog.Sinks.Async.PerformanceTests/LatencyBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ namespace Serilog.Sinks.Async.PerformanceTests
{
public class LatencyBenchmark
{
private readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
new MessageTemplate(new[] {new TextToken("Hello")}), new LogEventProperty[0]);

private Logger _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger;
Logger _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger;

static LatencyBenchmark()
{
SelfLog.Enable(new TerminatingTextWriter());
}

[Setup]
[GlobalSetup]
public void Reset()
{
foreach (var logger in new[] { _syncLogger, _asyncLogger, _fileLogger, _asyncFileLogger})
Expand Down
8 changes: 4 additions & 4 deletions test/Serilog.Sinks.Async.PerformanceTests/SignallingSink.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

namespace Serilog.Sinks.Async.PerformanceTests
{
internal class SignallingSink : ILogEventSink
class SignallingSink : ILogEventSink
{
private readonly int _expectedCount;
private readonly ManualResetEvent _wh;
private int _current;
readonly int _expectedCount;
readonly ManualResetEvent _wh;
int _current;

public SignallingSink(int expectedCount)
{
Expand Down
10 changes: 5 additions & 5 deletions test/Serilog.Sinks.Async.PerformanceTests/ThroughputBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ namespace Serilog.Sinks.Async.PerformanceTests
{
public class ThroughputBenchmark
{
private const int Count = 10000;
const int Count = 10000;

private readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
readonly LogEvent _evt = new LogEvent(DateTimeOffset.Now, LogEventLevel.Information, null,
new MessageTemplate(new[] {new TextToken("Hello")}), new LogEventProperty[0]);

private readonly SignallingSink _signal;
private Logger _syncLogger, _asyncLogger;
readonly SignallingSink _signal;
Logger _syncLogger, _asyncLogger;

public ThroughputBenchmark()
{
_signal = new SignallingSink(Count);
}

[Setup]
[GlobalSetup]
public void Reset()
{
_syncLogger?.Dispose();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class BackgroundWorkerSinkIntegrationSpec
/// <summary>
/// If <see cref="withDelay" />, then adds a 1sec delay before every fifth element created
/// </summary>
private static void CreateAudits(ILogger logger, int count, bool withDelay)
static void CreateAudits(ILogger logger, int count, bool withDelay)
{
var delay = TimeSpan.FromMilliseconds(1000);
var sw = new Stopwatch();
Expand Down Expand Up @@ -47,7 +47,7 @@ private static void CreateAudits(ILogger logger, int count, bool withDelay)
}
}

private static List<LogEvent> RetrieveEvents(MemorySink sink, int count)
static List<LogEvent> RetrieveEvents(MemorySink sink, int count)
{
Debug.WriteLine("{0:h:mm:ss tt} Retrieving {1} events", DateTime.Now, count);

Expand Down Expand Up @@ -91,9 +91,9 @@ public GivenBufferQueueAndDelays()

public abstract class SinkSpecBase : IDisposable
{
private bool _delayCreation;
private Logger _logger;
private MemorySink _memorySink;
bool _delayCreation;
Logger _logger;
MemorySink _memorySink;

protected SinkSpecBase(bool useBufferedQueue, bool delayCreation)
{
Expand Down
4 changes: 2 additions & 2 deletions test/Serilog.Sinks.Async.Tests/BackgroundWorkerSinkSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,12 @@ public void MonitorParameterAffordsSinkInspectorSuitableForHealthChecking()
Assert.Null(monitor.Inspector);
}

private BackgroundWorkerSink CreateSinkWithDefaultOptions()
BackgroundWorkerSink CreateSinkWithDefaultOptions()
{
return new BackgroundWorkerSink(_logger, 10000, false);
}

private static LogEvent CreateEvent()
static LogEvent CreateEvent()
{
return new LogEvent(DateTimeOffset.MaxValue, LogEventLevel.Error, null,
new MessageTemplate("amessage", Enumerable.Empty<MessageTemplateToken>()),
Expand Down

0 comments on commit 91f7b81

Please sign in to comment.