BlazorWasmProfiler 0.0.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package BlazorWasmProfiler --version 0.0.0.1
NuGet\Install-Package BlazorWasmProfiler -Version 0.0.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="BlazorWasmProfiler" Version="0.0.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add BlazorWasmProfiler --version 0.0.0.1
#r "nuget: BlazorWasmProfiler, 0.0.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install BlazorWasmProfiler as a Cake Addin
#addin nuget:?package=BlazorWasmProfiler&version=0.0.0.1

// Install BlazorWasmProfiler as a Cake Tool
#tool nuget:?package=BlazorWasmProfiler&version=0.0.0.1

BlazorWasmProfiler

Poor Man's Blazor Wasm Profiler

It uses AspectInjector to time the execution of every method in your Blazor WASM project.

It also measures the render time of every Blazor Component that defines these two methods:

    protected override void OnParametersSet()
    {
    }

    protected override void OnAfterRender(bool firstRender)
    {
    }

It does not work with OnParametersSetAsync() or OnAfterRenderAsync(bool firstRender)

How to use:

  1. Include NuGet package from https://www.nuget.org/packages/BlazorWasmProfiler

     <ItemGroup>
         <PackageReference Include="BlazorWasmProfiler" Version="0.0.0.1" />
     </ItemGroup>
    
  2. Add [assembly: BlazorTimer] somewhere in your code.

  3. Access statistics:

     var methodStatistics = BlazorTimerAttribute.GetMethodStatistics();
    
     var renderStatistics = BlazorTimerAttribute.GetRenderStatistics();
    
  4. (optional) If you want you can change

     <Router AppAssembly="@typeof(App).Assembly">
    

    to

     <Router 
         AppAssembly="@typeof(App).Assembly" 
         AdditionalAssemblies="new[] { typeof(BlazorWasmProfiler.BlazorTimerAttribute).Assembly }">
    

    then you can use these two pages that display statistics in a table

     <a href="MethodCallStatistics">Method Call Statistics</a>
     <a href="RenderTimeStatistics">Render Time Statistics</a>
    

Version history:

  • 0.0.0.1:
    • Initial release

MethodCallStatistics

RenderTimeStatistics

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.0.1 338 8/2/2023
0.0.0.1 174 7/31/2023