Wickra.Benchmark 0.1.1

dotnet add package Wickra.Benchmark --version 0.1.1
                    
NuGet\Install-Package Wickra.Benchmark -Version 0.1.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="Wickra.Benchmark" Version="0.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Wickra.Benchmark" Version="0.1.1" />
                    
Directory.Packages.props
<PackageReference Include="Wickra.Benchmark" />
                    
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 Wickra.Benchmark --version 0.1.1
                    
#r "nuget: Wickra.Benchmark, 0.1.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 Wickra.Benchmark@0.1.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=Wickra.Benchmark&version=0.1.1
                    
Install as a Cake Addin
#tool nuget:?package=Wickra.Benchmark&version=0.1.1
                    
Install as a Cake Tool

Wickra Benchmark — C#

Recompute a curated benchmark case or suite with the deterministic Wickra engine and confirm its report and hash, from .NET over the Wickra C ABI.

It calls the ABI through P/Invoke and returns the core's canonical JSON string verbatim, so its responses are byte-identical to the Rust, Python, Node.js, WASM, C/C++, Go, Java and R bindings: one runner behind every language.

Install

dotnet add package Wickra.Benchmark

Usage

Everything goes through a Benchmark driven by JSON commands — the same command protocol every Wickra binding shares.

using System.Text.Json;
using Wickra.Benchmark;

using var bench = new Benchmark();

var runCase = new
{
    cmd = "run_case",
    @case = new
    {
        id = "sma-crossover-01",
        strategy = strategySpec,      // a wickra-backtest StrategySpec
        dataset_ref = "sma-uptrend.csv",
        expected = expectedReport,
        expected_hash = expectedHash,
    },
    data = candles,
};
string outJson = bench.Command(JsonSerializer.Serialize(runCase));
Console.WriteLine(outJson); // the full CaseResult as JSON

Benchmark owns a native handle, so dispose it — using or Dispose().

Commands

cmd Payload Response
run_case {case, data} the full CaseResult
run_suite {suite, datasets} a SuiteReport
list_cases {suite} {ids:[...]} (sorted)
version {version:...,engine_version:...}

data is an array of candles; datasets maps each dataset_ref to its candle array. One committed example of every envelope lives in golden/commands/.

Domain errors (a bad case, an unknown command) come back in-band as {"ok":false,"error":...}; only null/UTF-8/panic conditions throw.

Building and testing the binding

Requires the .NET 8 SDK and the native library, built from the C-ABI crate:

cargo build -p wickra-benchmark-c --release  # -> target/release
dotnet test bindings/csharp/WickraBenchmark.Tests/WickraBenchmark.Tests.csproj

The test project copies the native library next to the test assembly; for your own app, ensure wickra_benchmark.dll / .so / .dylib is on the load path.

The golden test replays every envelope in golden/commands/ and asserts the response equals golden/expected/ byte for byte. That is the cross-language parity check — the same assertion runs in all ten languages.

Documentation

Security

Found a security issue? Please don't open a public issue. Report it privately via the repository's Security tab ("Report a vulnerability") or email support@wickra.org. Full policy: https://github.com/wickra-lib/wickra-benchmark/blob/main/SECURITY.md.

Disclaimer

Not a trading system. A benchmark report is a deterministic transform of the input data — it is not financial advice and is not indicative of future performance. Provided as is, without warranty of any kind.

License

Licensed under either of MIT or Apache-2.0 at your option.

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.
  • net8.0

    • No dependencies.

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.1.1 32 9/6/2026
0.1.0 31 9/6/2026