Skip to content

Commit 566ce93

Browse files
committed
Update benchmarks
1 parent 56965c2 commit 566ce93

5 files changed

Lines changed: 27 additions & 19 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ Here's a quick summary about how this library performs with a quick example of m
4040

4141
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
4242
|---------------------------- |-----------:|---------:|---------:|-------:|-------:|----------:|
43-
| Marshall_AWS_Reflection | 2,467.8 ns | 48.87 ns | 68.51 ns | 0.5112 | 0.0038 | 6450 B |
44-
| Marshall_Source_Generated | 234.0 ns | 2.92 ns | 2.73 ns | 0.1421 | 0.0010 | 1784 B |
45-
| Unmarshall_AWS_Reflection | 2,397.0 ns | 36.13 ns | 30.17 ns | 0.5188 | 0.0038 | 6544 B |
46-
| Unmarshall_Source_Generated | 131.6 ns | 0.82 ns | 0.77 ns | 0.0126 | - | 160 B |
43+
| Marshall_AWS_Reflection | 5,351.9 ns | 74.57 ns | 69.75 ns | 0.8545 | - | 10875 B |
44+
| Marshall_Source_Generated | 488.9 ns | 8.21 ns | 7.68 ns | 0.2375 | 0.0019 | 2984 B |
45+
| Unmarshall_AWS_Reflection | 5,447.3 ns | 68.30 ns | 63.89 ns | 0.8545 | - | 10922 B |
46+
| Unmarshall_Source_Generated | 923.6 ns | 10.92 ns | 10.21 ns | 0.0610 | - | 768 B |
4747

4848
## Features:
4949

tests/DynamoDBGenerator.SourceGenerator.Benchmarks/MarshallBenchmark.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public class MarshallBenchmark
1919
private readonly PersonEntity _singleElement;
2020
private readonly Dictionary<string, AttributeValue> _attributeValues;
2121

22+
2223
public MarshallBenchmark()
2324
{
2425
var fixture = new Fixture();
@@ -62,4 +63,4 @@ public PersonEntity Unmarshall_Source_Generated()
6263
{
6364
return PersonEntity.PersonEntityMarshaller.Unmarshall(_attributeValues);
6465
}
65-
}
66+
}
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using Amazon.DynamoDBv2.DataModel;
22
using DynamoDBGenerator.Attributes;
3-
namespace DynamoDBGenerator.SourceGenerator.Benchmarks.Models;
43

4+
namespace DynamoDBGenerator.SourceGenerator.Benchmarks.Models;
55

66
[DynamoDBMarshaller(EntityType = typeof(PersonEntity))]
77
public partial record PersonEntity
@@ -11,5 +11,11 @@ public partial record PersonEntity
1111

1212
public string Firstname { get; set; } = null!;
1313
public string Lastname { get; set; } = null!;
14+
public DateTime BirthDate { get; set; }
15+
public DateTime UpdatedAt { get; set; }
16+
public DateTime InsertedAt { get; set; }
17+
public DateTime? DeletedAt { get; set; }
1418
public Address Address { get; set; } = null!;
15-
}
19+
public HashSet<string> StringSet { get; set; }
20+
public HashSet<int> IntSet { get; set; }
21+
}

tests/DynamoDBGenerator.SourceGenerator.Benchmarks/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
using BenchmarkDotNet.Running;
55
using DynamoDBGenerator.SourceGenerator.Benchmarks;
66

7-
BenchmarkRunner.Run<MarshallBenchmark>();
7+
BenchmarkRunner.Run<MarshallBenchmark>();
Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
```
22
3-
BenchmarkDotNet v0.14.0, Windows 11 (10.0.22631.4541/23H2/2023Update/SunValley3)
3+
BenchmarkDotNet v0.14.0, Windows 11 (10.0.26100.4484)
44
Intel Core Ultra 9 185H, 1 CPU, 22 logical and 16 physical cores
5-
.NET SDK 8.0.307
6-
[Host] : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
7-
.NET 8.0 : .NET 8.0.11 (8.0.1124.51707), X64 RyuJIT AVX2
5+
.NET SDK 9.0.107
6+
[Host] : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
7+
.NET 8.0 : .NET 8.0.17 (8.0.1725.26602), X64 RyuJIT AVX2
88
9-
Job=.NET 8.0 Runtime=.NET 8.0
9+
Job=.NET 8.0 Runtime=.NET 8.0
1010
1111
```
12-
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
13-
|--------------- |-----------:|---------:|---------:|-------:|-------:|----------:|
14-
| Marshall_AWS | 2,478.4 ns | 18.54 ns | 28.31 ns | 0.6676 | 0.0076 | 8386 B |
15-
| Marshall_SG | 428.6 ns | 5.97 ns | 10.76 ns | 0.3076 | 0.0038 | 3864 B |
16-
| Unmarshall_AWS | 2,271.2 ns | 17.33 ns | 16.21 ns | 0.5150 | 0.0038 | 6504 B |
17-
| Unmarshall_SG | 126.4 ns | 0.65 ns | 0.58 ns | 0.0126 | - | 160 B |
12+
13+
| Method | Mean | Error | StdDev | Gen0 | Gen1 | Allocated |
14+
|---------------------------- |-----------:|---------:|---------:|-------:|-------:|----------:|
15+
| Marshall_AWS_Reflection | 5,351.9 ns | 74.57 ns | 69.75 ns | 0.8545 | - | 10875 B |
16+
| Marshall_Source_Generated | 488.9 ns | 8.21 ns | 7.68 ns | 0.2375 | 0.0019 | 2984 B |
17+
| Unmarshall_AWS_Reflection | 5,447.3 ns | 68.30 ns | 63.89 ns | 0.8545 | - | 10922 B |
18+
| Unmarshall_Source_Generated | 923.6 ns | 10.92 ns | 10.21 ns | 0.0610 | - | 768 B |

0 commit comments

Comments
 (0)