Skip to content

PageFaultsPerSecondStatistic is not taking care of MacOS #487

@DigitalBox98

Description

@DigitalBox98

When starting the server on MacOS, the below error is raised :

[21:08:52,652] System.IO.DirectoryNotFoundException: Could not find a part of the path '/proc/stat'.

Looking at PageFaultStatistics.cs, it only handles Windows else it supposes it's Linux whereas it could be also MacOS :

public PageFaultsPerSecondStatistic()
{
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
{
performanceStatistic = new PerformanceCounterStatistic("Memory", "Pages/sec", null);
}
else
{
performanceStatistic = new LinuxPageFaultsPerSecondStatistic();
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions