-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Proposal: Serve results via a webserver (from PR #779 discussion) #781
Comments
Take #691 into consideration. Rename? Overwrite? |
re:#691 if an outfile name is supplied, pass it to the browser (as is being done now.) |
Right now, the Scalene profile page is generated from a template with Jinja - the reason for this is that I want it to create a self-contained HTML file that is easily shareable. Is this doable in your proposal? |
TL;dr yes, it's easy The HTML page is capable of loading and displaying the profile at run time, you could also merge profiling data and other inline content to generate a page. I see three main use cases for shipping profile data files with an external viewer:
In any case, if you have a viewer page that can fetch a profile (as now), it's still possible to have a tool embed the data in a page to generate a new shareable page. |
Prior discussion
Emery:
Unpacking the idea:
open("https://${host}:${port}/viewer.html?profile=${profile-path}")
. It works the same way locally or on the development server. Locally could use a temp dir and fixed name by default.profile{$timestamp}.json
or, optionally,profile-$appname-$timestamp.json
with the prefix coming from a command-line flag.Granted, it's a lot of little changes -- changing page generation, how the page gets its data, updating the server, documentation, etc. -- so it could qualify as a major release. Having a series of runs available enables comparisons between them, taking multiple runs and averaging results, etc.
P.S.
--outfile foo.json
,--no-browser
, andscalene --viewer
could remain grandfathered in.The text was updated successfully, but these errors were encountered: