Tech:Speedscope

The Speedscope service is a node/express service running in a docker container on speedscope211. It has three purposes: Storing Speedscope profiles that were generated by the Speedscope extension on appservers, aggregating profiles that were generated for sampled production requests, and serving the profiles at https://speedscope.wikitide.net/ through HTTPS.

The repository of the service can be found at https://github.com/weirdgloop/speedscope-service. It is maintained by Weird Gloop.

Recording a profile

You can record a profile by appending the forceprofile=1 parameter to any request sent to MediaWiki. For normal HTML responses, a toast notification with links to the profile will be displayed after the page has loaded. In addition, all responses (including e.g. requests to load.php or JSON API requests) will contain the profile-id header with the profile ID as the value.

Aggregations

The speedscope service will automatically created aggregations based on all sampled profiles (which means that profiles recorded using forceprofile=1 will not be included).

Every hour at :00, the service will take all profiles from the last hour and aggregate them to an hourly profile. After this, all sampled profiles will be deleted. Additionally, every 24 hours at 00:30 UTC, the service will take all profiles from the last 24 hours and aggregate them to a daily profile. One the daily aggregation is complete, all hourly aggregations will be deleted.

Categories


Go to Source →