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)
17internal sealed class DiskStatsReader(IFileSystem fileSystem) : IDiskStatsReader
Linux\LinuxUtilizationParserCgroupV1.cs (4)
87private readonly IFileSystem _fileSystem; 90public LinuxUtilizationParserCgroupV1(IFileSystem fileSystem, IUserHz userHz) 403private static bool TryGetCpuUnitsFromCgroups(IFileSystem fileSystem, out float cpuUnits) 453private static bool TryGetCgroupRequestCpu(IFileSystem fileSystem, out float cpuUnits)
Linux\LinuxUtilizationParserCgroupV2.cs (10)
93private readonly IFileSystem _fileSystem; 99public LinuxUtilizationParserCgroupV2(IFileSystem fileSystem, IUserHz userHz) 516private static (long cpuUsageNanoseconds, long nrPeriods) ParseCpuUsageFromFile(IFileSystem fileSystem, FileInfo cpuUsageFile) 596private static bool TryGetCpuUnitsFromCgroups(IFileSystem fileSystem, out float cpuUnits) 610private static bool TryGetCpuLimitFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 621private static bool TryParseCpuQuotaAndPeriodFromFile(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 662private static long GetCpuPeriodsIntervalFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile) 730private static bool TryGetCgroupRequestCpu(IFileSystem fileSystem, out float cpuUnits) 741private static bool TryGetCgroupRequestCpuV2(IFileSystem fileSystem, FileInfo cpuRequestsFile, out float cpuUnits) 752private 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)
132builder.Services.TryAddSingleton<IFileSystem, OSFileSystem>();