1
0

chore: Introduce Qodana static analysis configuration and apply minor code formatting and C# 12 collection expressions.

This commit is contained in:
2026-03-01 20:07:20 +01:00
parent ec575ab5f9
commit 15f9647f8a
24 changed files with 344 additions and 80 deletions

View File

@@ -23,7 +23,7 @@ public static class LatencyTestCommand
AnsiConsole.MarkupLine("Generating 1-second silent audio file for testing...");
var testWavPath = Constants.Paths.LatencyTestWavFile;
var pInfo = new ProcessStartInfo
{
FileName = Constants.Commands.AudioFfmpeg,
@@ -43,17 +43,17 @@ public static class LatencyTestCommand
}
var client = new OpenAiCompatibleClient(config.GroqApiKey);
try
{
await AnsiConsole.Status()
.StartAsync("Running latency test...", async ctx =>
.StartAsync("Running latency test...", async ctx =>
{
ctx.Status("Testing STT (Whisper)...");
var sttWatch = Stopwatch.StartNew();
var transcript = await client.TranscribeAsync(testWavPath, config.WhisperLanguage, config.WhisperModel);
sttWatch.Stop();
ctx.Status("Testing LLM (Llama)...");
var systemPrompt = PromptBuilder.BuildPrompt(config);
var llmWatch = Stopwatch.StartNew();
@@ -66,7 +66,7 @@ public static class LatencyTestCommand
var table = new Table();
table.AddColumn("Operation");
table.AddColumn("Latency (ms)");
table.AddRow("STT", sttWatch.ElapsedMilliseconds.ToString());
table.AddRow("LLM", llmWatch.ElapsedMilliseconds.ToString());
table.AddRow("[bold]Total[/]", $"[bold]{total}ms[/]");