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

Support devices with FPS > 60 #135

Open
Almouro opened this issue Jul 4, 2023 · 3 comments
Open

Support devices with FPS > 60 #135

Almouro opened this issue Jul 4, 2023 · 3 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@Almouro
Copy link
Member

Almouro commented Jul 4, 2023

What

Max FPS is set to 60 in the code
We need to account for devices with a higher refresh rate

How to implement

  • this file needs to be changed flashlight-open-source/packages/platforms/android/src/commands/atrace/pollFpsUsage.ts
  • score calculation need to take into account max fps flashlight-open-source/packages/core/reporter/src/reporting/getScore.ts

We need to add screenRefreshRate into the interfaces TestCaseResult and AveragedTestCaseResult
We need to find a way to measure it and add it to the report

So that max FPS in graphs and score is max FPS du device

@Almouro Almouro added bug Something isn't working enhancement New feature or request labels Jul 4, 2023
@MalcolmTomisin
Copy link
Contributor

Hi @Almouro

Checking in on this, I have a POC on getting max FPS on Android devices. There are gaps in my knowledge of how Flashlight's internals passes data around. How do you reckon data be passed to the reporting and web app clients from data gotten from the shell.
Here's what I have tried; I assumed data is passed on around by sockets, I have tried emiting data to the webapp but I haven't been successful at that. I would greatly appreciate your insights here. Huge fan of flashlight.

@Almouro
Copy link
Member Author

Almouro commented Aug 20, 2024

Thanks @MalcolmTomisin! That's very cool!! ♥️

It's weird that it doesn't get reported properly.
You can try and run flashlight measure or test locally https://github.com/bamlab/flashlight/blob/main/CONTRIBUTING.md#measure-command

For the measure command, data is indeed transmitted via Socket, measures are updated here

Alternatively, you can run the undocumented command node packages/platforms/android/dist/src/commands.js profile --fps to have live FPS polling the CLI to make sure the measures are correct.

I think the score should get messed up (because we also have an hardcoded value in flashlight-open-source/packages/core/reporter/src/reporting/getScore.ts) but at least the higher FPS should be visible on the graph 🤔

@MalcolmTomisin
Copy link
Contributor

Yup I did get messed up scores...I figured out the hardcoded fps contributed to that. I would get right to your recommendations. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants