micmro / performance-bookmarklet

Performance-Bookmarklet helps to analyze the current page through the Resource Timing API, Navigation Timing API and User-Timing - requests by type, domain, load times, marks and more. Sort of a light live WebPageTest.
MIT License
1.14k stars 87 forks source link

Data store #36

Closed hunter2009 closed 8 years ago

hunter2009 commented 8 years ago

The project is very useful for web performance, I want to use it in my project, but I need some API to save performace data for analysing user's performace, can you give me some advise?

micmro commented 8 years ago

Sorry for the late reply, I was quite busy in the last days.

I am not sure I fully understand the question, but I give it a stab anyway :) : To get a (real) users performance data you can store data from the Resource Timing API, Navigation Timing API and User-Timing API data (e.g. window.performance...) and use a tool like Boomerang or the new Beacon API to send it back to your server or wherever you store your logs.

If you want to just test it synthetically you could use the awesome WebPageTest and store the result as a HAR.

I hope this answers your question.

hunter2009 commented 8 years ago

Thank you, @micmro .It's hopeful to me. I want use it in my project because it's really a useful tool, but I want to save users' data in production line,and I hope you can provide a API to implement it, just like what navigator.sendBeacon do, can I get your email to keep in touch because I come from China and we have different time zones, thank you.

micmro commented 8 years ago

I'm in Korea it's not such a different time zone ;).

Sorry I don't understand how this should work, performance-bookmarklet is a bookmarklet for the local performant measurements, it's not installed in the site. Would you want to get your users to install it and see their requests performance metrics or do you just want to collect data and visualize it centrally? If the second is the case I don't think this is the right solution for you.

hunter2009 commented 8 years ago

I'm busy because I upgrade babel from 5 to 6, and causing many problems. I want to collect users' data by inserting your js file and user don't need to install any plugins in their browsers.