Skip to content

Commit

Permalink
Renormalise git files
Browse files Browse the repository at this point in the history
  • Loading branch information
RehanSaeed committed Jun 28, 2022
1 parent d733149 commit 99a6a25
Show file tree
Hide file tree
Showing 41 changed files with 4,483 additions and 4,483 deletions.
928 changes: 464 additions & 464 deletions .editorconfig

Large diffs are not rendered by default.

708 changes: 354 additions & 354 deletions .gitignore

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
``` ini

BenchmarkDotNet=v0.10.12, OS=Windows 10 Redstone 1 [1607, Anniversary Update] (10.0.14393.1944)
Intel Core i5-6300U CPU 2.40GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
Frequency=2437506 Hz, Resolution=410.2554 ns, Timer=TSC
.NET Core SDK=2.1.4
[Host] : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
Clr : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2117.0
Core : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT


```
| Method | Job | Runtime | Mean | Error | StdDev | Gen 0 | Allocated |
|----------------------- |----- |-------- |-----------:|-----------:|-----------:|-------:|----------:|
| ReflectionDestructurer | Clr | Clr | 9.966 us | 0.1979 us | 0.3196 us | 2.4719 | 3.81 KB |
| CustomDestructurer | Clr | Clr | 7.567 us | 0.0839 us | 0.0701 us | 2.2278 | 3.44 KB |
| ReflectionDestructurer | Core | Core | 850.053 us | 7.5538 us | 7.0658 us | 9.7656 | 16.11 KB |
| CustomDestructurer | Core | Core | 868.570 us | 17.1272 us | 17.5884 us | 9.7656 | 15.74 KB |
``` ini

BenchmarkDotNet=v0.10.12, OS=Windows 10 Redstone 1 [1607, Anniversary Update] (10.0.14393.1944)
Intel Core i5-6300U CPU 2.40GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
Frequency=2437506 Hz, Resolution=410.2554 ns, Timer=TSC
.NET Core SDK=2.1.4
[Host] : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
Clr : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2117.0
Core : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT


```
| Method | Job | Runtime | Mean | Error | StdDev | Gen 0 | Allocated |
|----------------------- |----- |-------- |-----------:|-----------:|-----------:|-------:|----------:|
| ReflectionDestructurer | Clr | Clr | 9.966 us | 0.1979 us | 0.3196 us | 2.4719 | 3.81 KB |
| CustomDestructurer | Clr | Clr | 7.567 us | 0.0839 us | 0.0701 us | 2.2278 | 3.44 KB |
| ReflectionDestructurer | Core | Core | 850.053 us | 7.5538 us | 7.0658 us | 9.7656 | 16.11 KB |
| CustomDestructurer | Core | Core | 868.570 us | 17.1272 us | 17.5884 us | 9.7656 | 15.74 KB |
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Method;Job;AnalyzeLaunchVariance;EvaluateOverhead;MaxAbsoluteError;MaxRelativeError;MinInvokeCount;MinIterationTime;RemoveOutliers;Affinity;Jit;Platform;Runtime;AllowVeryLargeObjects;Concurrent;CpuGroups;Force;HeapAffinitizeMask;HeapCount;NoAffinitize;RetainVm;Server;Arguments;BuildConfiguration;Clock;EngineFactory;EnvironmentVariables;Toolchain;IsBaseline;InvocationCount;IterationTime;LaunchCount;RunStrategy;TargetCount;UnrollFactor;WarmupCount;Mean;Error;StdDev;Gen 0;Allocated
ReflectionDestructurer;Clr;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Clr;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;9.966 us;0.1979 us;0.3196 us;2.4719;3.81 KB
CustomDestructurer;Clr;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Clr;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;7.567 us;0.0839 us;0.0701 us;2.2278;3.44 KB
ReflectionDestructurer;Core;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Core;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;850.053 us;7.5538 us;7.0658 us;9.7656;16.11 KB
CustomDestructurer;Core;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Core;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;868.570 us;17.1272 us;17.5884 us;9.7656;15.74 KB
Method;Job;AnalyzeLaunchVariance;EvaluateOverhead;MaxAbsoluteError;MaxRelativeError;MinInvokeCount;MinIterationTime;RemoveOutliers;Affinity;Jit;Platform;Runtime;AllowVeryLargeObjects;Concurrent;CpuGroups;Force;HeapAffinitizeMask;HeapCount;NoAffinitize;RetainVm;Server;Arguments;BuildConfiguration;Clock;EngineFactory;EnvironmentVariables;Toolchain;IsBaseline;InvocationCount;IterationTime;LaunchCount;RunStrategy;TargetCount;UnrollFactor;WarmupCount;Mean;Error;StdDev;Gen 0;Allocated
ReflectionDestructurer;Clr;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Clr;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;9.966 us;0.1979 us;0.3196 us;2.4719;3.81 KB
CustomDestructurer;Clr;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Clr;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;7.567 us;0.0839 us;0.0701 us;2.2278;3.44 KB
ReflectionDestructurer;Core;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Core;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;850.053 us;7.5538 us;7.0658 us;9.7656;16.11 KB
CustomDestructurer;Core;False;Default;Default;Default;Default;Default;Default;15;RyuJit;X64;Core;False;True;False;True;Default;Default;False;False;False;Default;Default;Default;Default;Default;Default;Default;1;Default;Default;Default;Default;16;Default;868.570 us;17.1272 us;17.5884 us;9.7656;15.74 KB
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>DestructuringBenchmark</title>

<style type="text/css">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
td, th { padding: 6px 13px; border: 1px solid #ddd; }
tr { background-color: #fff; border-top: 1px solid #ccc; }
tr:nth-child(even) { background: #f8f8f8; }
</style>
</head>
<body>
<pre><code>
BenchmarkDotNet=v0.10.12, OS=Windows 10 Redstone 1 [1607, Anniversary Update] (10.0.14393.1944)
Intel Core i5-6300U CPU 2.40GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
Frequency=2437506 Hz, Resolution=410.2554 ns, Timer=TSC
.NET Core SDK=2.1.4
[Host] : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
Clr : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2117.0
Core : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
</code></pre>
<pre><code></code></pre>

<table>
<thead><tr><th> Method</th><th>Job</th><th>Runtime</th><th>Mean</th><th>Error</th><th>StdDev</th><th>Gen 0</th><th>Allocated</th>
</tr>
</thead><tbody><tr><td>ReflectionDestructurer</td><td>Clr</td><td>Clr</td><td>9.966 us</td><td>0.1979 us</td><td>0.3196 us</td><td>2.4719</td><td>3.81 KB</td>
</tr><tr><td>CustomDestructurer</td><td>Clr</td><td>Clr</td><td>7.567 us</td><td>0.0839 us</td><td>0.0701 us</td><td>2.2278</td><td>3.44 KB</td>
</tr><tr><td>ReflectionDestructurer</td><td>Core</td><td>Core</td><td>850.053 us</td><td>7.5538 us</td><td>7.0658 us</td><td>9.7656</td><td>16.11 KB</td>
</tr><tr><td>CustomDestructurer</td><td>Core</td><td>Core</td><td>868.570 us</td><td>17.1272 us</td><td>17.5884 us</td><td>9.7656</td><td>15.74 KB</td>
</tr></tbody></table>
</body>
</html>
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>DestructuringBenchmark</title>

<style type="text/css">
table { border-collapse: collapse; display: block; width: 100%; overflow: auto; }
td, th { padding: 6px 13px; border: 1px solid #ddd; }
tr { background-color: #fff; border-top: 1px solid #ccc; }
tr:nth-child(even) { background: #f8f8f8; }
</style>
</head>
<body>
<pre><code>
BenchmarkDotNet=v0.10.12, OS=Windows 10 Redstone 1 [1607, Anniversary Update] (10.0.14393.1944)
Intel Core i5-6300U CPU 2.40GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
Frequency=2437506 Hz, Resolution=410.2554 ns, Timer=TSC
.NET Core SDK=2.1.4
[Host] : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
Clr : .NET Framework 4.6.1 (CLR 4.0.30319.42000), 64bit RyuJIT-v4.7.2117.0
Core : .NET Core 2.0.5 (Framework 4.6.26020.03), 64bit RyuJIT
</code></pre>
<pre><code></code></pre>

<table>
<thead><tr><th> Method</th><th>Job</th><th>Runtime</th><th>Mean</th><th>Error</th><th>StdDev</th><th>Gen 0</th><th>Allocated</th>
</tr>
</thead><tbody><tr><td>ReflectionDestructurer</td><td>Clr</td><td>Clr</td><td>9.966 us</td><td>0.1979 us</td><td>0.3196 us</td><td>2.4719</td><td>3.81 KB</td>
</tr><tr><td>CustomDestructurer</td><td>Clr</td><td>Clr</td><td>7.567 us</td><td>0.0839 us</td><td>0.0701 us</td><td>2.2278</td><td>3.44 KB</td>
</tr><tr><td>ReflectionDestructurer</td><td>Core</td><td>Core</td><td>850.053 us</td><td>7.5538 us</td><td>7.0658 us</td><td>9.7656</td><td>16.11 KB</td>
</tr><tr><td>CustomDestructurer</td><td>Core</td><td>Core</td><td>868.570 us</td><td>17.1272 us</td><td>17.5884 us</td><td>9.7656</td><td>15.74 KB</td>
</tr></tbody></table>
</body>
</html>
70 changes: 35 additions & 35 deletions Benchmarks/Serilog.Exceptions.Benchmark/BenchmarkException.cs
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
namespace Serilog.Exceptions.Benchmark;

using System;
using System.Runtime.Serialization;

[Serializable]
public class BenchmarkException : Exception
{
public BenchmarkException()
{
}

public BenchmarkException(string message)
: base(message)
{
}

public BenchmarkException(string message, Exception inner)
: base(message, inner)
{
}

protected BenchmarkException(
SerializationInfo info,
StreamingContext context)
: base(info, context)
{
}

public string? ParamString { get; set; }

public int ParamInt { get; set; }

public Point? Point { get; set; }
}
namespace Serilog.Exceptions.Benchmark;

using System;
using System.Runtime.Serialization;

[Serializable]
public class BenchmarkException : Exception
{
public BenchmarkException()
{
}

public BenchmarkException(string message)
: base(message)
{
}

public BenchmarkException(string message, Exception inner)
: base(message, inner)
{
}

protected BenchmarkException(
SerializationInfo info,
StreamingContext context)
: base(info, context)
{
}

public string? ParamString { get; set; }

public int ParamInt { get; set; }

public Point? Point { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
namespace Serilog.Exceptions.Benchmark;

using System;
using System.Collections.Generic;
using Serilog.Exceptions.Core;
using Serilog.Exceptions.Destructurers;

/// <summary>
/// A destructurer used in benchmarks.
/// </summary>
/// <seealso cref="ExceptionDestructurer" />
public class BenchmarkExceptionDestructurer : ExceptionDestructurer
{
/// <inheritdoc />
public override Type[] TargetTypes => new[] { typeof(BenchmarkException) };

/// <inheritdoc />
public override void Destructure(
Exception exception,
IExceptionPropertiesBag propertiesBag,
Func<Exception, IReadOnlyDictionary<string, object?>?> destructureException)
{
base.Destructure(exception, propertiesBag, destructureException);

#pragma warning disable CA1062 // Validate arguments of public methods
var benchmarkException = (BenchmarkException)exception;
propertiesBag.AddProperty("ParamString", benchmarkException.ParamString);
propertiesBag.AddProperty("ParamInt", benchmarkException.ParamInt);
propertiesBag.AddProperty("Point", new Dictionary<string, object?>
{
{ "X", benchmarkException.Point?.X },
{ "Y", benchmarkException.Point?.Y },
});
#pragma warning restore CA1062 // Validate arguments of public methods
}
}
namespace Serilog.Exceptions.Benchmark;

using System;
using System.Collections.Generic;
using Serilog.Exceptions.Core;
using Serilog.Exceptions.Destructurers;

/// <summary>
/// A destructurer used in benchmarks.
/// </summary>
/// <seealso cref="ExceptionDestructurer" />
public class BenchmarkExceptionDestructurer : ExceptionDestructurer
{
/// <inheritdoc />
public override Type[] TargetTypes => new[] { typeof(BenchmarkException) };

/// <inheritdoc />
public override void Destructure(
Exception exception,
IExceptionPropertiesBag propertiesBag,
Func<Exception, IReadOnlyDictionary<string, object?>?> destructureException)
{
base.Destructure(exception, propertiesBag, destructureException);

#pragma warning disable CA1062 // Validate arguments of public methods
var benchmarkException = (BenchmarkException)exception;
propertiesBag.AddProperty("ParamString", benchmarkException.ParamString);
propertiesBag.AddProperty("ParamInt", benchmarkException.ParamInt);
propertiesBag.AddProperty("Point", new Dictionary<string, object?>
{
{ "X", benchmarkException.Point?.X },
{ "Y", benchmarkException.Point?.Y },
});
#pragma warning restore CA1062 // Validate arguments of public methods
}
}
Loading

0 comments on commit 99a6a25

Please sign in to comment.