code performance idea in team environment
-
Ah, didn't see your implementation yet. The using statement certainly makes it better than what I've seen, although using a callback means you can also log any input and output parameters (which is what the code I came across also did). I'm not a fan of AOP, it caused me more trouble than added benefit. I am curious though, why not put the timing in a unit test? That way you can test your code for speed without actually touching your code, but your build will still break. Of course you won't have the benefit of the log statement in production (but how often do you check that, really?).
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
Sander Rossel wrote:
The using statement certainly makes it better
Hi, Sandor, I'm curious: I don't see any use of 'using in the code; are you referring to the use of the '#if DEBUG' compiler directive ?
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
-
Sander Rossel wrote:
The using statement certainly makes it better
Hi, Sandor, I'm curious: I don't see any use of 'using in the code; are you referring to the use of the '#if DEBUG' compiler directive ?
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
It's the usage of the class.
using (new TimedBlock())
{
// Your time critical code here.
}:) Also, you're consistently spelling my name wrong.
Best, Sander arrgh.js - Bringing LINQ to JavaScript SQL Server for C# Developers Succinctly Object-Oriented Programming in C# Succinctly
-
What you really need is to provide every developer with an IoT device that measures their performance. Then management can sit back and watch the performance degrade as each new patch is made, all on a pretty web-socket / SignalR enabled realtime website. And while you're at it, the integrated build process can run Visual Studio's code analysis. Degrading performance. Increasing complexity. :) Marc
V.A.P.O.R.ware - Visual Assisted Programming / Organizational Representation Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny Artificial intelligence is the only remedy for natural stupidity. - CDP1802
Exacerbating the debacle again Marc?
Software Zen:
delete this;