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) 559private static (long cpuUsageNanoseconds, long nrPeriods) ParseCpuUsageFromFile(IFileSystem fileSystem, FileInfo cpuUsageFile) 639private static bool TryGetCpuUnitsFromCgroups(IFileSystem fileSystem, out float cpuUnits) 653private static bool TryGetCpuLimitFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 664private static bool TryParseCpuQuotaAndPeriodFromFile(IFileSystem fileSystem, FileInfo cpuLimitsFile, out float cpuUnits) 705private static long GetCpuPeriodsIntervalFromCgroupsV2(IFileSystem fileSystem, FileInfo cpuLimitsFile) 773private static bool TryGetCgroupRequestCpu(IFileSystem fileSystem, out float cpuUnits) 784private static bool TryGetCgroupRequestCpuV2(IFileSystem fileSystem, FileInfo cpuRequestsFile, out float cpuUnits) 795private 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>();