Posts

Showing posts with the label Performance

HttpModule to check the performance of a (sharepoint) site

Image
I want to share the code of a http module I made for checking the performance of the backend site creation process. The result indicates if the site will break down when its launched and used by tausends of people. You can leave this module in your solution and activate it everytime you have to check the performance of a webpart or control. The module is simply activated by inserting an entry in the web.config. When you type perf=1 in the querystring (ex. http://mydomain.com/pages/default.aspx?perf=1) than a little yellow div will appear on the upper left corner, that displays the information. Performance of the backend process First we create a new class and implent the IHttpModule interface. We implement the init method, which is the starting point.There we have to create two delegates, that process the request. In an other class we implement the PerformanceFilter to manipulate the outputstream of the request. Here we read the stream an place a div with the information w...