Prefix

Reading time ~1 minute

I’ve been playing with a new tool from Stackify recently called Prefix and so far I’m really impressed. Prefix is a free .Net profiler that shows all the web requests, sql queries and service calls etc that run through your local IIS.

Being able to see how many service calls and how long SQL queries are taking per request can be extremely useful to helping solve performance issues.

Setup

Setup is very easy, especially if you are using local IIS. A quick install and then Prefix will configure itself to start profiling IIS. If you are using IIS Express then you need to setup the Stackify HTTP module manually. Instructions can be found here.

Its been pretty useful to keep the Prefix UI open all the time on my second screen. Not as something I refer to constantly but its there when I need it if something takes a while to run. As of yet I’ve not noticed it having any negative effect on my laptop’s performance.

Logging

If you want to view related logging for a call in Prefix, you will to get relevant Nlog/Log4Net Stackify nuget packages. It can be really useful to see only the relevant logging messages to a specific call rather than searching through a whole log file. If you leave the Stackify API key blank then the profiler will only run locally.

Supported Frameworks

Currently Prefix supports more than 30 .Net libraries. I was pleased to see that they are supporting a range of really useful libraries such as MVC, Nancy, SQL Server, Mongo and Redis just to name a few. Furthermore, most aync calls are also supported.

With site performance being so crucial, its really helpful find backend issues before they even leave the development machine. The fact that it’s free doesn’t hurt either. To get Prefx you can download it from prefix.io.

Update

I’ve updated this blog post just to show a nice little tip that you can do when using Prefix. You can just leave the API key blank in your web.config and the profiler won’t run on the server. However, if you don’t want unused libraries deployed to the server you can exclude them from your nuget package in your nuspec file.

For example;

<files>
    <file src="bin\**" target="bin\" exclude="StackifyLib.NLog.dll;StackifyLib.log4net.dll" />
</files>

Coverage Gutters - VS Code

Use the Coverage Gutters extension in VS Code to understand your test coverage even better Continue reading

XP Manchester - Why isn't XP the norm?

Published on February 22, 2021

Metrics give you the bad news

Published on January 23, 2021