1 implementation of IFileSystem
Microsoft.Extensions.Diagnostics.ResourceMonitoring (1)
Linux\OSFileSystem.cs (1)
21internal sealed class OSFileSystem : IFileSystem
18 references to IFileSystem
Microsoft.Extensions.Diagnostics.ResourceMonitoring (18)
Linux\Disk\DiskStatsReader.cs (1)
16internal sealed class DiskStatsReader(IFileSystem fileSystem) : IDiskStatsReader
Linux\LinuxUtilizationParserCgroupV1.cs (4)
87private readonly IFileSystem _fileSystem; 90public LinuxUtilizationParserCgroupV1(IFileSystem fileSystem, IUserHz userHz) 409private static bool TryGetCpuUnitsFromCgroups(IFileSystem fileSystem, out float cpuUnits) 459private static bool TryGetCgroupRequestCpu(IFileSystem fileSystem, out float cpuUnits)
Linux\LinuxUtilizationParserCgroupV2.cs (10)
95private readonly IFileSystem _fileSystem; 101public LinuxUtilizationParserCgroupV2(IFileSystem fileSystem, IUserHz userHz) 562private static (long cpuUsageNanoseconds, long nrPeriods) ParseCpuUsageFromFile(IFileSystem fileSystem, FileInfo cpuUsageFile) 642private static bool TryGetCpuUnitsFromCgroups(IFileSystem fileSystem, out float cpuUnits) 656private static bool TryGetCpuLimitFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 667private static bool TryParseCpuQuotaAndPeriodFromFile(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 708private static long GetCpuPeriodsIntervalFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile) 776private static bool TryGetCgroupRequestCpu(IFileSystem fileSystem, out float cpuUnits) 787private static bool TryGetCgroupRequestCpuV2(IFileSystem fileSystem, FileInfo cpuRequestsFile, out float cpuUnits) 798private static bool TryParseCpuWeightFromFile(IFileSystem fileSystem, FileInfo cpuWeightFile, out float cpuUnits)
Linux\Network\LinuxNetworkUtilizationParser.cs (2)
30private readonly IFileSystem _fileSystem; 42public LinuxNetworkUtilizationParser(IFileSystem fileSystem)
ResourceMonitoringServiceCollectionExtensions.cs (1)
135builder.Services.TryAddSingleton<IFileSystem, OSFileSystem>();