Skip to main content

Module evm_profile_server

Module evm_profile_server 

Source
Expand description

Local HTTP server for serving EVM profiles to speedscope.app.

This module implements a temporary local HTTP server that:

  1. Serves the profile JSON at /{token}/profile.json
  2. Sets CORS headers to allow the viewer to fetch it
  3. Constructs the proper URL and opens it in the browser

Structsยง

ServerState ๐Ÿ”’

Functionsยง

generate_token ๐Ÿ”’
Generates a random token for the URL path (32 hex characters).
percent_encode ๐Ÿ”’
Percent-encode a URL for embedding in viewer URL parameters.
serve_and_open
Serves a profile on a local HTTP server and opens it in the browser.
serve_profile ๐Ÿ”’