Skip to content

The percent of memory usage is a lie #9

@saitolume

Description

@saitolume

I cannot understand which methods should I use.

Screenshot:

Screen Shot 2019-12-08 at 12 54 58

src/renderer/components/StatusBar.ts:

  // This is a lie
  const calcPercentMemoryUsage = useCallback(async () => {
    const { private: notShared, shared } = await getProcessMemoryInfo()
    const percentMemoryUsage = ((notShared + shared) / total) * 100
    return Math.round(percentMemoryUsage * 100) / 100
  }, [getProcessMemoryInfo, total])

References:

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions