I would like to run profiling code against some services running in testing and production. My plan is to use PostSharp to implement a class that looks like
public class TimerAttribute : OnMethodBoundaryAspect
{
//some data members
//...
public override void OnEntry(MethodExecutionEventArgs eventArgs)
{
//write method entry time to file
}
public override void OnExit(MethodExecutionEventArgs eventArgs)
{
//write method exit time to file
}
}
Before I go too far, are there any potential pitfalls I should be aware of? Will widespread use (i.e. just adding a line to assemblyinfo) of these methods cause serious (in terms of the validity of the timing data) performance issues?