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

Getting CPU clock tick and RAM page size fails often #13

Closed
Almouro opened this issue Aug 17, 2022 · 0 comments · Fixed by #12
Closed

Getting CPU clock tick and RAM page size fails often #13

Almouro opened this issue Aug 17, 2022 · 0 comments · Fixed by #12

Comments

@Almouro
Copy link
Member

Almouro commented Aug 17, 2022

Reproduced on Samsung J3 Android 9

This command fails
https://github.com/bamlab/android-performance-profiler/blob/main/packages/android-performance-profiler/src/commands/cpu/getCpuClockTick.ts#L6
100 is a good default value but it seems like for some phones, this is completely innacurate (for a Moto e5 this seemed off)
Same for https://github.com/bamlab/android-performance-profiler/blob/main/packages/android-performance-profiler/src/commands/ram/pollRamUsage.ts#L6

The issue is that getconf doesn't seem to exist on all Android versions.

To fix this, running sysconf(_SC_CLK_TCK) and sysconf(_SC_PAGESIZE) via a C++ script should retrieve the proper values

We could include this in the C++ profiler script like in here: #12

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 a pull request may close this issue.

1 participant