Executor.VisulizerClient 1.0.1

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package Executor.VisulizerClient --version 1.0.1
                    
NuGet\Install-Package Executor.VisulizerClient -Version 1.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="Executor.VisulizerClient" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Executor.VisulizerClient" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Executor.VisulizerClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Executor.VisulizerClient --version 1.0.1
                    
#r "nuget: Executor.VisulizerClient, 1.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.
#:package Executor.VisulizerClient@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Executor.VisulizerClient&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Executor.VisulizerClient&version=1.0.1
                    
Install as a Cake Tool

Job Visualization System

This document describes the real-time job visualization functionality implemented in the VisulizerClient project.

Overview

The visualization system provides real-time monitoring and analytics for background job execution, including:

  • Real-time job statistics (success rates, throughput, etc.)
  • Queue-specific analytics (performance per queue)
  • Active job monitoring (currently processing jobs)
  • Console-based visualization (formatted real-time display)
  • Event-driven updates (callbacks for job state changes)

Models

JobVisualizationData

Represents a single job's visualization data including progress, execution time, and status.

JobStatistics

Overall statistics across all jobs including success rates, average execution times, and job counts by state.

QueueStatistics

Per-queue statistics including throughput, wait times, and job distribution by state.

RealTimeVisualizationData

Complete real-time data snapshot including overall stats, queue stats, and active jobs.

VisualizationSettings

Configuration options for real-time monitoring including refresh intervals and filtering options.

VisualizationEvent

Event data for real-time job state changes and monitoring updates.

Usage Examples

Basic Real-Time Data

// Inject IJobRepository into the visualizer
var visualizer = new Visualizer(jobRepository);

// Get current real-time data
var data = await visualizer.GetRealTimeDataAsync();

Console.WriteLine($"Total Jobs: {data.OverallStats.TotalJobs}");
Console.WriteLine($"Success Rate: {data.OverallStats.SuccessRate:P1}");
Console.WriteLine($"Active Jobs: {data.ActiveJobs.Count}");

Console Visualization

// Display beautiful formatted console output
var visualization = await visualizer.GetConsoleVisualizationAsync();
Console.WriteLine(visualization);

Real-Time Monitoring with Callbacks

// Setup monitoring settings
var settings = new VisualizationSettings
{
    RefreshIntervalMs = 1000, // Update every second
    MaxRecentJobs = 100,
    EnableRealTimeUpdates = true
};

// Start monitoring with callback
await visualizer.StartRealTimeMonitoringAsync(jobEvent =>
{
    Console.WriteLine($"[{jobEvent.Timestamp:HH:mm:ss}] {jobEvent.EventType}: {jobEvent.Message}");
}, settings);

// Stop monitoring when done
await visualizer.StopRealTimeMonitoringAsync();

Job Progress Tracking

// Monitor specific job progress
var jobProgress = await visualizer.GetJobProgressAsync(jobId);
if (jobProgress != null)
{
    Console.WriteLine($"Job {jobId}: {jobProgress.State} ({jobProgress.ProgressPercentage:F1}%)");
}

Queue Analytics

// Get detailed queue statistics
var queueStats = await visualizer.GetQueueStatisticsAsync();
foreach (var queue in queueStats)
{
    Console.WriteLine($"Queue '{queue.QueueName}': {queue.JobCount} jobs, {queue.Throughput:F1}/min");
}

Console Visualization Output

The console visualization provides a formatted real-time dashboard:

╔═══════════════════════════════════════════════════════════════╗
║                    JOB EXECUTION MONITOR                     ║
╠═══════════════════════════════════════════════════════════════╣
║ Last Update: 2025-07-08 14:30:15 UTC                         ║
╠═══════════════════════════════════════════════════════════════╣
║ OVERALL STATISTICS                                            ║
║ Total Jobs: 150        Success Rate: 94.0%                   ║
║ Enqueued: 5            Processing: 3                         ║
║ Succeeded: 141         Failed: 9                             ║
║ Avg Execution: 02:15                                         ║
╠═══════════════════════════════════════════════════════════════╣
║ QUEUE STATISTICS                                              ║
║ default         Jobs: 120    Throughput: 12.5/min           ║
║ priority        Jobs: 30     Throughput: 8.2/min            ║
╠═══════════════════════════════════════════════════════════════╣
║ ACTIVE JOBS                                                   ║
║ [PROC] Job 145   CalculateReportAsync    01:23               ║
║ [PROC] Job 147   ProcessDataAsync        00:45               ║
║ [QUEUE] Job 148  SendEmailAsync          00:00               ║
╚═══════════════════════════════════════════════════════════════╝

Features

Real-Time Monitoring

  • Automatic Updates: Timer-based polling for job state changes
  • Event Callbacks: Get notified when jobs change state
  • Configurable Intervals: Adjust refresh rates based on needs

Analytics

  • Success Rates: Calculate job success/failure percentages
  • Throughput: Jobs processed per minute by queue
  • Execution Times: Average and total execution durations
  • Wait Times: Average time jobs spend in queue

Filtering & Configuration

  • Queue Filtering: Monitor specific queues only
  • State Filtering: Show/hide jobs by state (success, failed, etc.)
  • Recent Job Limits: Control how many recent jobs to track
  • Error Detail Control: Show/hide detailed error messages

Integration

Dependency Injection Setup

// In your DI container configuration
services.AddScoped<IVisualizer, Visualizer>();

// Use with existing job repository
public class SomeController : ControllerBase
{
    private readonly IVisualizer _visualizer;
    
    public SomeController(IVisualizer visualizer)
    {
        _visualizer = visualizer;
    }
    
    [HttpGet("job-stats")]
    public async Task<RealTimeVisualizationData> GetJobStats()
    {
        return await _visualizer.GetRealTimeDataAsync();
    }
}

Console Application

// In a console application
var visualizer = new Visualizer(jobRepository);
var example = new VisualizerUsageExample(jobRepository);

// Start continuous monitoring
await example.ContinuousMonitoringLoopAsync();

Performance Considerations

  • Batch Loading: Jobs are loaded in batches to handle large datasets
  • Efficient Queries: Uses repository methods to filter by state
  • Configurable Refresh: Adjust monitoring frequency based on system load
  • Memory Management: Limits recent job tracking to prevent memory issues

Error Handling

The visualizer includes comprehensive error handling:

  • Database Connection Issues: Graceful degradation with error events
  • Monitoring Errors: Error events sent through callback system
  • Timeout Protection: Configurable timeouts for long-running operations
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.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