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 StatsCommand
|
||||
var totalCount = entries.Count;
|
||||
var totalDuration = TimeSpan.FromMilliseconds(entries.Sum(e => e.DurationMs));
|
||||
var avgDuration = TimeSpan.FromMilliseconds(entries.Average(e => e.DurationMs));
|
||||
|
||||
|
||||
var mostActiveDay = entries
|
||||
.GroupBy(e => e.Timestamp.Date)
|
||||
.OrderByDescending(g => g.Count())
|
||||
@@ -42,12 +42,12 @@ public static class StatsCommand
|
||||
AnsiConsole.MarkupLine($"[dim]Total recordings:[/] {totalCount}");
|
||||
AnsiConsole.MarkupLine($"[dim]Total duration:[/] {totalDuration.TotalMinutes:F1}m");
|
||||
AnsiConsole.MarkupLine($"[dim]Average processing latency:[/] {avgDuration.TotalSeconds:F2}s");
|
||||
|
||||
|
||||
if (mostActiveDay != null)
|
||||
{
|
||||
AnsiConsole.MarkupLine($"[dim]Most active day:[/] {mostActiveDay.Key:yyyy-MM-dd} ({mostActiveDay.Count()} recordings)");
|
||||
}
|
||||
|
||||
|
||||
if (topWords.Count > 0)
|
||||
{
|
||||
AnsiConsole.MarkupLine($"[dim]Top spoken words (>3 chars):[/] {string.Join(", ", topWords)}");
|
||||
|
||||
Reference in New Issue
Block a user