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

[browserstack benchmark tool] Add a html to present benchmark results #6740

Merged
merged 7 commits into from
Aug 11, 2022

Conversation

Linchenn
Copy link
Collaborator

@Linchenn Linchenn commented Aug 10, 2022

For browserstack benchmark tool, when you run:
node app.js --benchmark='./preconfigured_browser.json' --cloud --outfile, the program will benchmark all models on devices configured in preconfigured_browser.json file and then write down the benchmark results into a json file benchmark_results.json, which is too large to be readable.

This PR:

  1. lets the program write the benchmark results into a javascript variable (in benchmark_results.js), instead of a json file (benchmark_results.json). Then the benchmark results could be loaded easily to the html file.
  2. add a html file, which loads benchmark_results.js and renders the benchmark results into a table.

Then, whenever complete node app.js --benchmark='./preconfigured_browser.json' --cloud --outfile, users no longer need to read benchmark_results.json, and, they could simply open benchmark_results.html to see the results.

Preview

image

To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.


This change is Reviewable

(For developers only: if want to use typescript to re-write this, could continue on #6741)

Copy link
Collaborator

@lina128 lina128 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you allow either json or html to be generated?
maybe use a command line flag?

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

Copy link
Collaborator Author

@Linchenn Linchenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch!
Updated outfile argument. Thank you!

Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@Linchenn Linchenn requested a review from pyu10055 August 11, 2022 21:27
Copy link
Collaborator

@pyu10055 pyu10055 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thanks

Reviewed 1 of 2 files at r2, 1 of 2 files at r4, 2 of 2 files at r5, all commit messages.
Reviewable status: :shipit: complete! 2 of 1 approvals obtained

@Linchenn Linchenn merged commit 8715f58 into tensorflow:master Aug 11, 2022
@Linchenn Linchenn deleted the render branch August 11, 2022 21:49
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.

3 participants