![]() |
VOOZH | about |
dotnet add package ModelingEvolution.PerformanceMonitor.Shared --version 1.4.0
NuGet\Install-Package ModelingEvolution.PerformanceMonitor.Shared -Version 1.4.0
<PackageReference Include="ModelingEvolution.PerformanceMonitor.Shared" Version="1.4.0" />
<PackageVersion Include="ModelingEvolution.PerformanceMonitor.Shared" Version="1.4.0" />Directory.Packages.props
<PackageReference Include="ModelingEvolution.PerformanceMonitor.Shared" />Project file
paket add ModelingEvolution.PerformanceMonitor.Shared --version 1.4.0
#r "nuget: ModelingEvolution.PerformanceMonitor.Shared, 1.4.0"
#:package ModelingEvolution.PerformanceMonitor.Shared@1.4.0
#addin nuget:?package=ModelingEvolution.PerformanceMonitor.Shared&version=1.4.0Install as a Cake Addin
#tool nuget:?package=ModelingEvolution.PerformanceMonitor.Shared&version=1.4.0Install as a Cake Tool
👁 NuGet Server
👁 NuGet Client
👁 NuGet Shared
Real-time comprehensive performance monitoring system with Blazor WebAssembly frontend and SkiaSharp rendering.
Comprehensive System Monitoring - FULLY IMPLEMENTED
/proc/stat, calculates per-core loadnvidia-smi/proc/net/dev/proc/diskstatsnvidia-smi (optional, for GPU monitoring)dotnet build BlazorPerfMon.sln
cd src/ModelingEvolution.BlazorPerfMon.Server
dotnet run
Access at: http://localhost:5000
WebSocket endpoint: ws://localhost:5000/ws
To integrate the Performance Monitor client into your Blazor WASM application:
dotnet add package ModelingEvolution.PerformanceMonitor.Client
Program.cs:using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using ModelingEvolution.BlazorPerfMon.Client.Extensions;
var builder = WebAssemblyHostBuilder.CreateDefault(args);
// Calculate WebSocket URL from base address
string wsUrl = builder.HostEnvironment.BaseAddress
.Replace("http://", "ws://")
.Replace("https://", "wss://") + "ws";
// Register Performance Monitor client
builder.Services.AddPerformanceMonitorClient(wsUrl, dataPointsToKeep: 120);
await builder.Build().RunAsync();
@page "/"
@using ModelingEvolution.BlazorPerfMon.Client.Components
<PerformanceMonitorCanvas />
ServerUrl (optional): Override the default WebSocket URL for this component instanceShowStatusIndicator (default: true): Show/hide the connection status indicator (green/yellow/red dot)Example with custom parameters:
<PerformanceMonitorCanvas ServerUrl="ws://custom-server:5000/ws" ShowStatusIndicator="true" />
/proc/stat, /proc/net/dev, /proc/diskstats, nvidia-smi, Docker APITimer (configurable interval)
↓
Parallel Collectors → MetricSample
├─ CpuCollector.Collect() → float[]
├─ GpuCollector.Collect() → GpuMetric[]
├─ NetworkCollector.Collect() → NetworkMetric[]
├─ DiskCollector.Collect() → DiskMetric[]
└─ DockerCollector.Collect() → DockerContainerMetric[]
↓
BufferBlock<MetricSample> (capacity: configurable)
↓
TransformBlock → MessagePack serialize
↓
BroadcastBlock → All connected WebSocket clients
↓
ActionBlock per client → WebSocket.SendAsync
Achieved:
src/
ModelingEvolution.BlazorPerfMon.Server/
Core/ - Interfaces (IMetricsCollector)
Collectors/ - All metrics collectors
├─ CpuCollector.cs - CPU per-core load
├─ GpuCollector.cs - NVIDIA GPU monitoring
├─ NetworkCollector.cs - Network interface stats
├─ DiskCollector.cs - Disk I/O metrics
└─ DockerCollector.cs - Container monitoring
Services/ - MultiplexService, WebSocketService
Program.cs - Main entry point
ModelingEvolution.BlazorPerfMon.Client/
Models/ - MetricSample, CircularBuffer
Collections/ - ImmutableCircularBuffer
Services/ - WebSocketClient, MetricsStore
Rendering/ - All chart renderers
├─ IChart.cs - Chart interface
├─ Brushes.cs - Reusable SKPaint objects
├─ BarChart.cs - Generic bar chart
├─ CpuBarChart.cs - CPU bar visualization
├─ GpuBarChart.cs - GPU bar visualization
├─ TimeSeriesChart.cs - Time-series line charts
├─ NetworkChart.cs - Network RX/TX charts
├─ DiskChart.cs - Disk I/O charts
├─ DockerContainersChart.cs - Docker visualization
└─ ComputeLoadChart.cs - Overall compute load
Pages/ - Blazor pages
ModelingEvolution.BlazorPerfMon.Shared/
Models/ - Shared DTOs and models
examples/
ModelingEvolution.BlazorPerfMon.Example/
- Example implementation
Run tests:
dotnet test
Configure monitoring in appsettings.json or appsettings.{environment}.json:
{
"MonitorSettings": {
"NetworkInterface": "eth0",
"DiskDevice": "sda",
"CollectionIntervalMs": 500,
"DataPointsToKeep": 120,
"GpuCollectorType": "NvSmi",
"Layout": [
[ "CPU/16", "GPU/1", "Docker", "ComputeLoad/3|col-span:2" ],
[ "Network:eth0/2", "Disk:sda/2" ]
]
}
}
eth0, ether4)sda, mmcblk0)NvSmi: Standard NVIDIA GPU monitoring via nvidia-smiNvTegra: NVIDIA Jetson Tegra monitoring via tegrastatsThe Layout property defines how charts are arranged in a responsive grid. Each row is an array of chart specifications.
Chart Specification Format:
ChartType[:Identifier]/Count[|col-span:N]
Components:
ChartType: Type of chart (CPU, GPU, RAM, Network, Disk, Docker, ComputeLoad, Temperature):Identifier: Optional identifier for the specific instance (e.g., network interface name, disk device)/Count: Number of data points for this metric (e.g., 16 CPU cores, 2 GPUs)|col-span:N: Optional column span for proportional width (default: 1, range: 1-12)Examples:
"CPU/8" - CPU chart with 8 cores, spans 1 column"Network:eth0/2" - Network chart for eth0 interface with 2 data points (RX/TX)"Disk:sda/2" - Disk chart for sda device with 2 data points (read/write)"ComputeLoad/3|col-span:2" - Compute load chart with 3 data points, spans 2 columns"Temperature/9|col-span:5" - Temperature chart with 9 sensors, spans 5 columnsLayout Calculation:
["CPU/8", "Docker", "ComputeLoad/3|col-span:2"]
{
"MonitorSettings": {
"NetworkInterface": "ether4",
"DiskDevice": "mmcblk0",
"CollectionIntervalMs": 500,
"DataPointsToKeep": 120,
"GpuCollectorType": "NvTegra",
"Layout": [
[ "CPU/8", "Docker", "ComputeLoad/3|col-span:2" ],
[ "Network:ether4/2", "Disk:mmcblk0/2" ],
[ "Temperature/9|col-span:5" ]
]
}
}
{
"MonitorSettings": {
"NetworkInterface": "eth0",
"DiskDevice": "sda",
"CollectionIntervalMs": 500,
"DataPointsToKeep": 120,
"GpuCollectorType": "NvSmi",
"Layout": [
[ "CPU/16", "GPU/1", "Docker", "ComputeLoad/3|col-span:2" ],
[ "Network:eth0/2", "Disk:sda/2" ]
]
}
}
The project is set up to automatically publish NuGet packages to NuGet.org via GitHub Actions.
Use the provided release script:
./release.sh 1.0.0
This will:
perfmon/1.0.0Alternatively, create and push a tag manually:
git tag perfmon/1.0.0
git push origin perfmon/1.0.0
See SPEC.md for detailed implementation specification.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 2 NuGet packages that depend on ModelingEvolution.PerformanceMonitor.Shared:
| Package | Downloads |
|---|---|
|
ModelingEvolution.PerformanceMonitor.Server
Server-side metrics collection library for real-time performance monitoring on Linux systems. Includes collectors for CPU, GPU (NVIDIA), Network, Disk I/O, Docker containers, and RAM with TPL Dataflow pipeline and WebSocket streaming via MessagePack. |
|
|
ModelingEvolution.PerformanceMonitor.Client
Blazor WebAssembly client library for real-time performance monitoring with hardware-accelerated SkiaSharp rendering. Features include CPU, GPU, Network, Disk, Docker container, and RAM visualization with bar charts and time-series graphs. |
This package is not used by any popular GitHub repositories.