Skip to content

[1.x] Customise server stats #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 18, 2024
Merged

[1.x] Customise server stats #339

merged 4 commits into from
Mar 18, 2024

Conversation

timacdonald
Copy link
Member

fixes #322

Allows the server stat collection to be customised.

In a service provider it is now easy to customise the CPU and memory stat collection depending on your special operating system or unique infrastructure (docker, et al.).

Servers::detectCpuUsing(function (): int {
    // ...
});

Servers::detectMemoryUsing(fn () => [
    'total' => (int) /* ... */,
    'used' => (int) /* ... */,
]);

@jessarcher
Copy link
Member

Dig this!

@taylorotwell taylorotwell merged commit 94e9c58 into 1.x Mar 18, 2024
@timacdonald timacdonald deleted the customise-server-stats branch March 18, 2024 22:05
@justinkekeocha
Copy link

any documentation on how this can be used?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Servers inside container
4 participants