Though there are plenty of profilers on the market, most of them are huge and quite expensive software. Sometime the only thing needed is timing so you could understand where bottlenecks are. For that matter I started to use very simple piece of code:
TimeScopeResultProcessor.Instance.Register can be anything - usually writing to log (NLog, log4Net...) or even direct write to Console or database. There is a room for improvement: using some interface in Dispose, ability to cope with nested operations (that's the thing I' working on right now).
Using this is easy, here is the sample:
TimeScopeResultProcessor.Instance.Register can be anything - usually writing to log (NLog, log4Net...) or even direct write to Console or database. There is a room for improvement: using some interface in Dispose, ability to cope with nested operations (that's the thing I' working on right now).
No comments:
Post a Comment