Using MiniProfiler in a UI-less mode

MiniProfiler can profile your requests without displaying the results to the end user.

This is achieved by profiling server side using the same old:




And rendering the UI block

@using StackExchange.Profiling;

To disallow the UI from displaying ensure :

MiniProfiler.Settings.Results_Authorize = (request) =>
      // when you return false the user will not have access to the UI
      return Current.User.IsAdmin;