Worker Plugins

Extend runtime behavior with custom worker plugins and table outputs.

Built-In Plugin

Failed and timed out rows are automatically captured by the built-in plugin. Custom worker plugins receive typed LoadStrikeBaseContext, LoadStrikeSessionStartInfo, and LoadStrikeNodeStats service-layer contracts. LoadStrikeBaseContext exposes node metadata through NodeInfo and GetNodeInfo(), Python exposes NodeInfo accessors, and TypeScript/JavaScript custom plugins use PascalCase members such as PluginName, Init, Start, GetData, Stop, and Dispose in the public docs surface.

Report Configuration and Output Samples

Report-focused snippets for Worker Plugins.

Switch between C#, Java, Python, TypeScript, and JavaScript to see the native SDK shape for this sample.

Licensing note: every runnable sample requires a valid runner key via WithRunnerKey("...") or config key LoadStrike:RunnerKey.

HTML reports include an icon-only Light/Dark theme toggle fixed at the top-right. Default report theme is Light.

Worker Plugin

public sealed class SimplePlugin : ILoadStrikeWorkerPlugin
{
    public string PluginName => "simple";
    public Task Init(LoadStrikeBaseContext context, IConfiguration infraConfig) => Task.CompletedTask;
    public Task Start(LoadStrikeSessionStartInfo sessionInfo) => Task.CompletedTask;
    public Task Stop() => Task.CompletedTask;

    public Task<LoadStrikePluginData> GetData(LoadStrikeNodeStats stats)
    {
        var table = LoadStrikePluginDataTable.Create("summary");
        table.Rows.Add(new Dictionary<string, object> { ["name"] = "requests", ["value"] = stats.AllRequestCount });

        var data = LoadStrikePluginData.Create(PluginName);
        data.Hints.Add("Adds a custom report table.");
        data.Tables.Add(table);
        return Task.FromResult(data);
    }
}

Registration

WithWorkerPlugins(...)

Register one or more custom worker plugins so they participate in the run lifecycle and final report generation.

Plugin lifecycle

Plugins receive typed base context, session start info, final node stats, and a stop callback in a fixed lifecycle order across all supported SDKs.

Plugin output

Build custom hints and tables with LoadStrikePluginData.Create(...) and LoadStrikePluginDataTable.Create(...).