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

Improve user timing coloring #12

Open
denar90 opened this issue Mar 28, 2017 · 3 comments
Open

Improve user timing coloring #12

denar90 opened this issue Mar 28, 2017 · 3 comments

Comments

@denar90
Copy link
Contributor

denar90 commented Mar 28, 2017

Linking to GoogleChrome/lighthouse#1910

@denar90
Copy link
Contributor Author

denar90 commented Mar 28, 2017

Are there some ways to make changes to canvas which is drawing all timelines, so we will be able to colorize user timing?

@paulirish
Copy link
Member

https://github.com/ChromeDevTools/devtools-frontend/blob/4bb90e1913a4da551d8068ec4bc8874531670817/front_end/timeline/TimelineFlameChart.js#L528-L547

  if (event.hasCategory(TimelineModel.TimelineModel.Category.Console) ||
          event.hasCategory(TimelineModel.TimelineModel.Category.UserTiming))
        return this._consoleColorGenerator.colorForID(event.name);

basically if we can redefine the Timeline.TimelineFlameChartDataProvider instance's this._consoleColorGenerator.colorForID method then we can make it color however we want (based on the event.name).

the only hard part here is finding the path to the TimelineFlameChartDataProvider instance.
or its possible we can redefine PerfUI.FlameChart.ColorGenerator before the dataprovider instance is ever instantiated.

devtools hax. :)

@denar90
Copy link
Contributor Author

denar90 commented Mar 28, 2017

nice, thanks for pointing out on that stuff, now it will be much easier to make it happened)

let's do some hacking :)) 💪

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

No branches or pull requests

2 participants