People here are using visual studio for performance testing. Now there are some small issues with some javascript parts: they are not able to check the performance of the javascript part with visual studio web-performance testing.
I never used visual studio performance test, so I really have no idea how to bench stuff there, but I saw there are a lot of solutions for web + js performance check. I thought we could use other tools and frameworks, but its not allowed. People here want to use visual studio for everything. So this is making stuff more tricky.
If I would have to check the javascript performance, I would easily do something like this:
var begin = new Date();
functionA();
functionB();
functionX();
var end = new Date();
var bench = end - begin;
At the end I can see in the variable bench my result. Now I just have to pass this variable “somehow” to the visual studio performance test? Via C#? Or how is this stuff working? Could this be a good solution? Any other ideas?
I don’t think it’s possible because VS Performance Test Engine doesn’t run any client-side code at all, it works on HTTP level only. So the code you provided as an example would never be run.
Take a look here for the proof – http://msdn.microsoft.com/en-us/library/ff520100.aspx
So the only way would be to use other solutions to check javascript performance, or implement your own, based on Selenium for example. I think it’s possible to automate such measurements using Selenium RC which can be run from Visual Studio as a part of a build (if your requirement is to use Visual Studio for everything).