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

keep the order of the events that have the same timestamp #249

Closed
wants to merge 1 commit into from

Conversation

hwajaywang
Copy link

fix import trace event error while the event have the same timestamp.
like this:
[
{"tid": 1, "ph": "B", "pid": 0, "name": "Looper:dispatch(Loope)", "ts": 0},
{"tid": 1, "ph": "B", "pid": 0, "name": "MainActivity:onCreate(com.bytedance.android.app)", "ts": 8},
{"tid": 1, "ph": "B", "pid": 0, "name": "MainActivity:sayHello2(com.bytedance.android.app)", "ts": 22},
{"tid": 1, "ph": "B", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 22},
{"tid": 1, "ph": "E", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 54},
{"tid": 1, "ph": "B", "pid": 0, "name": "Speaker:sayHello(com.bytedance.android.app)", "ts": 58},
{"tid": 1, "ph": "B", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 58},
{"tid": 1, "ph": "E", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 64},
{"tid": 1, "ph": "E", "pid": 0, "name": "Speaker:sayHello(com.bytedance.android.app)", "ts": 64},
{"tid": 1, "ph": "E", "pid": 0, "name": "MainActivity:sayHello2(com.bytedance.android.app)", "ts": 65},
{"tid": 1, "ph": "E", "pid": 0, "name": "MainActivity:onCreate(com.bytedance.android.app)", "ts": 65},
{"tid": 1, "ph": "E", "pid": 0, "name": "Looper:dispatch(Loope)", "ts": 74},
{"tid": 1, "ph": "B", "pid": 0, "name": "Choreographer:doFrame(Choreographe)", "ts": 74},
{"tid": 1, "ph": "B", "pid": 0, "name": "BlockTextView:draw(com.bytedance.android.app.trace)", "ts": 91},
{"tid": 1, "ph": "B", "pid": 0, "name": "BlockTextView:onDraw(com.bytedance.android.app.trace)", "ts": 92},
{"tid": 1, "ph": "B", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 92},
{"tid": 1, "ph": "E", "pid": 0, "name": "Block:block(com.bytedance.android.app.trace)", "ts": 128},
{"tid": 1, "ph": "E", "pid": 0, "name": "BlockTextView:onDraw(com.bytedance.android.app.trace)", "ts": 128},
{"tid": 1, "ph": "E", "pid": 0, "name": "BlockTextView:draw(com.bytedance.android.app.trace)", "ts": 132},
{"tid": 1, "ph": "E", "pid": 0, "name": "Choreographer:doFrame(Choreographe)", "ts": 146}
]

@coveralls
Copy link

Coverage Status

Coverage remained the same at 47.016% when pulling ce28136 on hwajaywang:master into bdd9301 on jlfwong:master.

@jlfwong
Copy link
Owner

jlfwong commented Jan 16, 2020

Hi @hwajaywang!

Thanks for the report of the issue. I have a slightly different fix, and I'd like to include a new test in the PR that resolves this, so I'm going to close this PR and follow up soon with a new fix. This issue is now tracked as #251.

@jlfwong jlfwong closed this Jan 16, 2020
@jlfwong
Copy link
Owner

jlfwong commented Jan 16, 2020

This should be fixed in 1.5.3 on npm, and on https://www.speedscope.app/. Thanks again for your contribution!

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