-
Notifications
You must be signed in to change notification settings - Fork 47k
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
Creates a getMeasurementsSummaryMap in ReactDefaultPerf #2219
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks! |
CLA signed. |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Is it possible to call |
It's not because we are bundling everything for functional test. |
@@ -90,19 +90,23 @@ var ReactDefaultPerf = { | |||
); | |||
}, | |||
|
|||
printWasted: function(measurements) { | |||
measurements = measurements || ReactDefaultPerf._allMeasurements; | |||
getMeasurementsSummaryMap: function(measurements){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Space before the curly brace.
Creates a getMeasurementsSummaryMap in ReactDefaultPerf
=== Problem
ReactDefaultPerf has a printWasted function that uses console.table to show the results of the performance measurements.
PhantomJS doesn't have the console.table function, so it's hard to get the metrics and present them in a CI pipeline.
=== Solution
Create a ReactDefaultPerf.getMeasurementsSummaryMap that receives a set of measurements and just generate the summary map.
This solution make possible to get the performance summary and format them as you like. Even using console.log().