Skip to content
This repository was archived by the owner on Dec 1, 2025. It is now read-only.

Taiizor/Silvanna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Silvanna πŸš€

High-Performance .NET Benchmarking Library - Next Generation Performance Testing

.NET License Build Status NuGet

🎯 What is Silvanna?

Silvanna is a modern, comprehensive benchmarking library for .NET applications designed to provide accurate, reliable, and detailed performance measurements. Inspired by BenchmarkDotNet, Silvanna offers an intuitive API, advanced features, and superior developer experience.

✨ Key Features

  • πŸ”₯ Fast & Accurate: Nanosecond precision with statistical analysis
  • πŸ’Ύ Memory Diagnostics: Track allocations, GC pressure, and memory patterns
  • πŸ“Š Rich Reporting: HTML, Markdown, JSON, and custom report formats
  • ⚑ Async Support: First-class support for async/await patterns
  • πŸŽ›οΈ Flexible Configuration: Fluent API and attribute-based setup
  • πŸ“ˆ Regression Detection: Automatic performance regression identification
  • πŸ”§ Extensible: Plugin architecture for custom diagnosers and reporters

πŸš€ Quick Start

Installation

dotnet add package Silvanna

Your First Benchmark

using Silvanna;

[SimpleBenchmark]
public class MyFirstBenchmark
{
    private List<int> data = Enumerable.Range(0, 1000).ToList();

    [Benchmark]
    public int Sum() => data.Sum();

    [Benchmark]
    public int SumLinq() => data.Aggregate(0, (a, b) => a + b);
}

class Program
{
    static void Main(string[] args)
    {
        BenchmarkRunner.Run<MyFirstBenchmark>();
    }
}

Sample Output

|    Method |     Mean |   Error |  StdDev | Allocated |
|---------- |---------:|--------:|--------:|----------:|
|       Sum | 2.150 ΞΌs | 0.042 ΞΌs| 0.039 ΞΌs|      0 B |
|   SumLinq | 8.847 ΞΌs | 0.175 ΞΌs| 0.164 ΞΌs|     32 B |

πŸ“– Documentation

πŸ› οΈ Advanced Usage

Parametrized Benchmarks

[SimpleBenchmark]
public class ParametrizedBenchmark
{
    [Params(100, 1000, 10000)]
    public int Size { get; set; }

    private int[] data;

    [GlobalSetup]
    public void Setup() => data = new int[Size];

    [Benchmark]
    public void ArrayFill() => Array.Fill(data, 42);
}

Custom Configuration

var config = new BenchmarkConfig()
    .WithWarmupCount(5)
    .WithIterationCount(100)
    .AddDiagnoser<MemoryDiagnoser>()
    .AddReporter<HtmlReporter>()
    .Build();

BenchmarkRunner.Run<MyBenchmarks>(config);

πŸ—οΈ Architecture

Silvanna is built with extensibility and performance in mind:

  • Core Engine: Handles benchmark execution and isolation
  • Measurement System: Collects timing, memory, and hardware metrics
  • Analysis Module: Statistical analysis and regression detection
  • Reporting Layer: Generates various output formats
  • Diagnostics: Pluggable diagnostic tools

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup

# Clone the repository
git clone https://github.com/Taiizor/Silvanna.git

# Build the project
dotnet build

# Run tests
dotnet test

# Run benchmarks (dogfooding!)
dotnet run --project benchmarks/Silvanna.Benchmarks

πŸ“Š Performance Goals

  • Overhead: < 1% measurement overhead
  • Accuracy: Β±1ns timing precision
  • Memory: < 100MB runtime footprint
  • Startup: < 10ms initialization time

πŸ—ΊοΈ Roadmap

  • βœ… Core benchmarking engine
  • βœ… Basic statistical analysis
  • πŸ”„ Memory diagnostics (in progress)
  • πŸ“… Hardware counter support
  • πŸ“… Cloud dashboard integration
  • πŸ“… IDE plugins (VS/Rider)

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Inspired by BenchmarkDotNet
  • Statistical algorithms from MathNet.Numerics
  • Community contributors and testers

πŸ“ž Support


Made with ❀️ for the .NET community

About

Silvanna is a modern, comprehensive benchmarking library for .NET applications designed to provide accurate, reliable, and detailed performance measurements. Inspired by BenchmarkDotNet, Silvanna offers an intuitive API, advanced features, and superior developer experience.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages