Skip to content

Commit

Permalink
Fix SerializeStructBenchmark, Serializer not initialized (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkatufus authored Jan 11, 2022
1 parent 4ecbb05 commit 7a78155
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/Hyperion.Benchmarks/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@ class Program
{
static void Main(string[] args)
{
var benchmark = BenchmarkSwitcher.FromAssembly(Assembly.GetExecutingAssembly());
benchmark.RunAll();
var benchmark = BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly);

if (args.Length == 0)
{
benchmark.RunAll();
}
else
{
benchmark.Run(args);
}
}
}
}
1 change: 1 addition & 0 deletions src/Hyperion.Benchmarks/SerializeStructsBenchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class SerializeStructsBenchmark : HyperionBenchmark

protected override void Init()
{
base.Init();
standardValue = new StandardStruct(1, "John", "Doe", isLoggedIn: false);
blittableValue = new BlittableStruct(59, 92);
testEnum = TestEnum.HatesAll;
Expand Down

0 comments on commit 7a78155

Please sign in to comment.