I’ve been working on built-in profiler recently and got an issue with the loading method.
The problem happens only when you use custom storage like SqlServerStorage. and try to serialize a loaded profile.
easy way to reproduce:
var profiler = Profiler.Settings.Storage.Load(id);
var json = Profiler.ToJson(profiler);
This throws an unexpected exception.
After investigating with another serializer, it seems that there is a Null reference exception on the ElapsedTicks property.
This property uses data that is not properly initialized.
Can you take a look at this?
Is there any way to create custom resolvers?
Can you provide a small stand-alone project that repro’s this issue, including all configuration used. An easy way to publish a project is on GitHub, or a link to a .zip works too.
Ok, i’ll try to take some time this week to make an example.
Btw, i got my problem solved by building a custom “newtonsoft json” resolver ignoring that property (“ElapsedTicks”).
I have prototyped the standard servicestack profiler to get it work with Selfhost (API profiling), I know you are only supporting mvc, so i won’t bother you with that stuff