hide jellyfin timing stats by default; enable with env var (#2756)
This commit is contained in:
@@ -40,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- `ETV_SLOW_API_MS` - milliseconds threshold for logging slow API calls (at DEBUG level)
|
||||
- This is currently limited to *Jellyfin*
|
||||
- `ETV_JF_PAGE_SIZE` - page size for library scan API calls to Jellyfin; default value is 10
|
||||
- `ETV_JF_ENABLE_STATS` - enables logging timing information related to Jellyfin show library scans
|
||||
- Add `Select All` button to media pages by @Erotemic
|
||||
|
||||
### Fixed
|
||||
|
||||
@@ -56,6 +56,8 @@ public class SystemEnvironment
|
||||
}
|
||||
|
||||
JellyfinPageSize = jellyfinPageSize;
|
||||
|
||||
JellyfinEnableStats = !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("ETV_JF_ENABLE_STATS"));
|
||||
}
|
||||
|
||||
public static string BaseUrl { get; }
|
||||
@@ -68,4 +70,5 @@ public class SystemEnvironment
|
||||
public static int? SlowDbMs { get; }
|
||||
public static int? SlowApiMs { get; }
|
||||
public static int JellyfinPageSize { get; }
|
||||
public static bool JellyfinEnableStats { get; }
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Collections.Concurrent;
|
||||
using System.Diagnostics;
|
||||
using ErsatzTV.Core;
|
||||
|
||||
namespace ErsatzTV.Infrastructure;
|
||||
|
||||
@@ -16,7 +17,7 @@ public static class ScanProfiler
|
||||
|
||||
public static void LogStatistics(Action<string> logAction)
|
||||
{
|
||||
if (Measurements.IsEmpty)
|
||||
if (!SystemEnvironment.JellyfinEnableStats || Measurements.IsEmpty)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user