Skip to content

added isProfiling() to ReactDebugTool and isRunning() to PerfTools - #6763

Merged
gaearon merged 3 commits into
react:masterfrom
nfcampos:is-running
May 13, 2016
Merged

added isProfiling() to ReactDebugTool and isRunning() to PerfTools#6763
gaearon merged 3 commits into
react:masterfrom
nfcampos:is-running

Conversation

@nfcampos

Copy link
Copy Markdown

I'm not sure the tests are added are worth it,

closes #6762

@nfcampos

nfcampos commented May 12, 2016

Copy link
Copy Markdown
Author

should I add isRunning to the docs? is it this file?
https://github.com/facebook/react/blob/master/docs/docs/10.9-perf.md

@nfcampos

Copy link
Copy Markdown
Author

the build timed out for some reason, not really sure why

expect(console.error.calls.length).toBe(1);
});

it('returns isRunning state', () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It would be better to test this by running start() and stop().

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I've changed it

@ghost

ghost commented May 13, 2016

Copy link
Copy Markdown

@nfcampos updated the pull request.

@gaearon

gaearon commented May 13, 2016

Copy link
Copy Markdown
Collaborator

Let’s add extra tests that verify that running begin/start or end/stop twice has no effect.

@nfcampos

Copy link
Copy Markdown
Author

separate tests right? because they're testing start etc. instead of isRunning

@gaearon

gaearon commented May 13, 2016

Copy link
Copy Markdown
Collaborator

separate tests right? because they're testing start etc. instead of isRunning

Yeah. I’d probably just test the public API here (ReactPerf). Basically to verify that it doesn’t crash when you try to start() or stop() it twice, and that isRunning() returns a sensible value.

@nfcampos

Copy link
Copy Markdown
Author

@gaearon I've added those two tests to ReactPerf

@ghost

ghost commented May 13, 2016

Copy link
Copy Markdown

@nfcampos updated the pull request.

@gaearon
gaearon merged commit 5569d1d into react:master May 13, 2016
@gaearon

gaearon commented May 13, 2016

Copy link
Copy Markdown
Collaborator

Thanks!

@nfcampos
nfcampos deleted the is-running branch May 13, 2016 20:03
@zpao zpao modified the milestones: 15.1.0, 15.y.0 May 20, 2016
@zpao zpao modified the milestones: 15.y.0, 15-next Jun 1, 2016
zpao pushed a commit to zpao/react that referenced this pull request Jun 8, 2016
added isProfiling() to ReactDebugTool and isRunning() to PerfTools
(cherry picked from commit 5569d1d)
zpao pushed a commit that referenced this pull request Jun 14, 2016
added isProfiling() to ReactDebugTool and isRunning() to PerfTools
(cherry picked from commit 5569d1d)
@zpao zpao modified the milestones: 15-next, 15.2.0 Jun 14, 2016
mrizwanashiq pushed a commit to mrizwanashiq/react that referenced this pull request Jun 25, 2026
added isProfiling() to ReactDebugTool and isRunning() to PerfTools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ReactPerf 15.1.0-alpha.1 expose isProfiling on the exported object?

3 participants