2

I have recently written a bunch of aspects (using PostSharp in C#) that will be applied to methods in some high traffic sites.

How should I make sure they are going to perform?

Can anyone recommend some load testing/profiling techniques that I can use?

1

As aspects are typically written to add behaviour to code, I would suggest that you'll need to indirectly test the functionality by creating a test object/method that'll be impacted by the aspect and then blackbox test the code at runtime for the behaviour you'd expect to be seeing.

  • Thank you for your suggestion. I'm writing a collection of these aspects. Most of them will be applied to the web (a method in a class library, a WebAPI endpoint, an MVC action etc). So I was thinking I'll create a sample site and locally profile my aspects. Since I don't have any bench mark metrics, I'll compare the profile results of aspect against the other aspects. Then I'll give this test app to the testers (I'm a developer) to put into the load test environment to see if that shows any issues. Does that sound like what you're thinking? – Ev. Jan 14 '14 at 4:12
  • Yeah that sounds reasonable. It might be worth adding some log events with request ID's and detailed timestamps in your profiles that can be used to support analysis after the fact. – Toby Jackson Jan 14 '14 at 9:44
  • Cool - thanks Toby. Can you suggest any tools to help me? – Ev. Jan 15 '14 at 4:11
  • Afraid not, we've written our own Java based librar(y|ies) that use aspects to wrap around some Spring calls to provide tracing across web service boundaries. I'm not sure of anything "off-the-shelf" that'd help with this other than some creative use of logging+aspects – Toby Jackson Jan 15 '14 at 9:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.