Skip to content
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

Performance metric - RAM usage should be of process #449

Closed
Spragalas opened this issue Nov 7, 2018 · 4 comments
Closed

Performance metric - RAM usage should be of process #449

Spragalas opened this issue Nov 7, 2018 · 4 comments
Labels

Comments

@Spragalas
Copy link
Contributor

Spragalas commented Nov 7, 2018

Performance tracker for 'Private Bytes' tracks os ram usage, but it should be process ram usage.

 private _trackMemory() {
        var totalMem = os.totalmem();
        var freeMem = os.freemem();
        var usedMem = totalMem - freeMem;
        var percentUsedMem = usedMem / (totalMem || 1);
        var percentAvailableMem = freeMem / (totalMem || 1);
        this._client.trackMetric({name:"\\Process(??APP_WIN32_PROC??)\\Private Bytes", value: usedMem});
        this._client.trackMetric({name: "\\Memory\\Available Bytes", value: freeMem});
    }

With current implementation on Application Insights metrics view it shows os ram usage. This is bad if my App Service is running on Shared Resource Group on Azure.

Used memory should be tracked like this:
var usedMem = process.memoryUsage().heapTotal

@Spragalas Spragalas changed the title Performance metric - RAM usage should be of process not os Performance metric - RAM usage should be of process Nov 7, 2018
@OsvaldoRosado
Copy link
Member

Thank you for the report!

@Spragalas
Copy link
Contributor Author

@OsvaldoRosado when can we expect new build ?

@OsvaldoRosado
Copy link
Member

@Spragalas There isn't a set date, but I'd expect a new release within a week.

@Spragalas
Copy link
Contributor Author

@OsvaldoRosado Thanks!

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

No branches or pull requests

2 participants