Class PerfBenchmarkTool
Benchmark code execution: start/stop timers, measure performance.
public sealed class PerfBenchmarkTool : IBuiltInTool, ITool, IToolMetadata
- Inheritance
-
PerfBenchmarkTool
- Implements
- Inherited Members
Examples
Starting a named timer to instrument an agent's reasoning loop:
using LMKit.Agents;
using LMKit.Agents.Tools.BuiltIn.Utility;
var agent = Agent.CreateBuilder(model)
.WithTools(t => t.Register(new PerfBenchmarkTool()))
.Build();
var result = await agent.RunAsync("Start the 'pipeline' timer, do the work, then report the elapsed time.");
Properties
- Description
Gets a concise description of what the tool does.
- InputSchema
Gets the JSON Schema defining the expected input arguments.
- Name
Gets the stable, unique identifier for this tool.
Methods
- InvokeAsync(string, CancellationToken)
Executes the tool with the specified JSON arguments.