chore: Introduce Qodana static analysis configuration and apply minor code formatting and C# 12 collection expressions.
This commit is contained in:
@@ -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[/]");
|
||||
|
||||
Reference in New Issue
Block a user