By default the build script in gulp
will strip the debugging information. To get a version that will include all debug information and performance measures, please run the following command:
gulp debug
That will create a the following file:
./dist/sww.js
With all the debugging options that we are adding.
##Performance debugging
If you take a look to the code, you will see how in some places we are using the Performance Timing API, available in Firefox Nightly.
We have introduced some marks that will be useful in your script to complete other measures.
The philosophy behind this is to provide some marks at the begining of the events triggered by the ServiceWorker so later you can create more marks and measures in your specific middlwares.
Marks when the javascript file containing the library has been parsed.
Mark setup when the ServiceWorker receives one of those events.
This mark is setup when the method that process the event finish. Take into account that doesn't mean we have the result.
Specific mark for the SimpleOfflineCache
middleware that is setup when a request goues through this middleware.
Specific mark for the SimpleOfflineCache
middleware, setup once that we did query the database associated to this middleware.
As well this mark is associated to the SimpleOfflineCache
. We will have it if we have a hit on the offline cache.