Browse Source

hide jellyfin timing stats by default; enable with env var (#2756)

pull/2758/head
Jason Dove 7 months ago committed by GitHub
parent
commit
cc521326d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      ErsatzTV.Core/SystemEnvironment.cs
  3. 3
      ErsatzTV.Infrastructure/ScanProfiler.cs

1
CHANGELOG.md

@ -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) - `ETV_SLOW_API_MS` - milliseconds threshold for logging slow API calls (at DEBUG level)
- This is currently limited to *Jellyfin* - 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_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 - Add `Select All` button to media pages by @Erotemic
### Fixed ### Fixed

3
ErsatzTV.Core/SystemEnvironment.cs

@ -56,6 +56,8 @@ public class SystemEnvironment
} }
JellyfinPageSize = jellyfinPageSize; JellyfinPageSize = jellyfinPageSize;
JellyfinEnableStats = !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("ETV_JF_ENABLE_STATS"));
} }
public static string BaseUrl { get; } public static string BaseUrl { get; }
@ -68,4 +70,5 @@ public class SystemEnvironment
public static int? SlowDbMs { get; } public static int? SlowDbMs { get; }
public static int? SlowApiMs { get; } public static int? SlowApiMs { get; }
public static int JellyfinPageSize { get; } public static int JellyfinPageSize { get; }
public static bool JellyfinEnableStats { get; }
} }

3
ErsatzTV.Infrastructure/ScanProfiler.cs

@ -1,5 +1,6 @@
using System.Collections.Concurrent; using System.Collections.Concurrent;
using System.Diagnostics; using System.Diagnostics;
using ErsatzTV.Core;
namespace ErsatzTV.Infrastructure; namespace ErsatzTV.Infrastructure;
@ -16,7 +17,7 @@ public static class ScanProfiler
public static void LogStatistics(Action<string> logAction) public static void LogStatistics(Action<string> logAction)
{ {
if (Measurements.IsEmpty) if (!SystemEnvironment.JellyfinEnableStats || Measurements.IsEmpty)
{ {
return; return;
} }

Loading…
Cancel
Save