nblumhardt / serilog-timings

Extends Serilog with support for timed operations
Apache License 2.0
218 stars 22 forks source link

#18 removed allocation of Stopwatch and replaced with two longs #36

Closed EamonHetherton closed 2 years ago

EamonHetherton commented 4 years ago

There was only one simple open issue; I couldn't resist :)

nblumhardt commented 2 years ago

Picking this up now 😅 -- hope 2022 is off to a good start, @EamonHetherton !

nblumhardt commented 2 years ago

On NuGet.org now, though with a few TFM compatibility changes; let me know if it looks like I broke too much in my last-minute hacking 😅

nblumhardt commented 2 years ago

Sorry, I spoke too soon, build issue yet to fix..

davidpeden3 commented 2 years ago

@nblumhardt i literally just needed this again and walked through all of our chat history in the other two PRs. what's the status on this? how do i get my beloved .Elapsed?  🥺

nblumhardt commented 2 years ago

Hi David! How does version 3.0.0-dev-* from NuGet work for you? It might be time to mark 3.0.0 as done 🤔

davidpeden3 commented 2 years ago

hey @nblumhardt, i had not seen the pre-release version. thanks for pointing it out. here is my before code:

image

and here is my after code:

image

the only difference/downside i see is that my original code allowed for not logging at all under a configured threshold. i was planning on launching with the information threshold set to 0ms but figured i could raise that up to filter out the noise for api calls that are deemed sufficiently fast. with the new implementation, i can't do that.

thoughts?

nblumhardt commented 2 years ago

Looks like a nice improvement @davidpeden3, if you're happy to lose the "floor" functionality 👍

Might be a bit of a feature gap at this stage - beyond a certain point it'll be better to just write the extra code outside this library than to try to incorporate more into the API.

davidpeden3 commented 2 years ago

reading into your comment, i will not submit a pr to add the capability. thanks for the feedback. when will 3.0 move out of pre-release?

image
nblumhardt commented 2 years ago

Queued up https://github.com/nblumhardt/serilog-timings/pull/46 - thanks @davidpeden3