-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SerializeStructBenchmark, Serializer not initialized #282
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
else | ||
{ | ||
benchmark.Run(args); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slight changes so we can pass arguments to BenchmarkDotNet from command line. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,7 @@ public class SerializeStructsBenchmark : HyperionBenchmark | |
|
||
protected override void Init() | ||
{ | ||
base.Init(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The actual fix, |
||
standardValue = new StandardStruct(1, "John", "Doe", isLoggedIn: false); | ||
blittableValue = new BlittableStruct(59, 92); | ||
testEnum = TestEnum.HatesAll; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM