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

Fix debug callback of LogViewer #318

Merged
merged 1 commit into from
May 7, 2019
Merged

Conversation

Pessimistress
Copy link
Contributor

@Pessimistress Pessimistress commented May 6, 2019

For #315

@@ -155,13 +155,13 @@ export default class Core3DViewer extends PureComponent {
_onMetrics = deckMetrics => {
if (this.props.debug) {
const metrics = {
fps: deckMetrics.fps,
redraw: deckMetrics.redraw || 0
fps: deckMetrics.frameRate.hz,
Copy link
Contributor

Choose a reason for hiding this comment

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

is fps the same as hz?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, all stats have a field called hz, and fps refers to how many animation frame are requested per second.

This is experimental API and we will need to do a thorough audit in 7.1 time frame.

Copy link
Contributor

@marionleborgne marionleborgne May 6, 2019

Choose a reason for hiding this comment

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

Why not frameRate.count like the other metrics? Also hz gives a float with many decimals.

Screen Shot 2019-05-06 at 4 41 22 PM

Copy link
Contributor

@marionleborgne marionleborgne left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this @Pessimistress

@@ -155,13 +155,13 @@ export default class Core3DViewer extends PureComponent {
_onMetrics = deckMetrics => {
if (this.props.debug) {
const metrics = {
fps: deckMetrics.fps,
redraw: deckMetrics.redraw || 0
fps: deckMetrics.frameRate.hz,
Copy link
Contributor

@marionleborgne marionleborgne May 6, 2019

Choose a reason for hiding this comment

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

Why not frameRate.count like the other metrics? Also hz gives a float with many decimals.

Screen Shot 2019-05-06 at 4 41 22 PM

@Pessimistress
Copy link
Contributor Author

Why not frameRate.count like the other metrics?

hz more accurately reflects the frames per second. Although we attempt to fire debug every second, more than 1s might have passed since the last report. We are working on aligning the format for all statistics in the next release.

@Pessimistress Pessimistress merged commit f039ca6 into master May 7, 2019
@Pessimistress Pessimistress deleted the x/metrics-callback branch May 7, 2019 19:28
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