-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
1,867 additions
and
57 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// vim: set ts=4 sw=4: | ||
/* perf based flamegraphs | ||
A view allowing you to start a remote perf tool run and process | ||
the result into a SVG to be displayed by the renderer. */ | ||
|
||
renderers.perfFlameGraph = function perfFlameGraphRenderer() { | ||
}; | ||
|
||
renderers.perfFlameGraph.prototype.render = function(pAPI, id, host) { | ||
var r = this; | ||
|
||
$(id).html(` | ||
<div class='rendererForm'> | ||
Duration <input readonly type='text' id='perfFlameGraphDuration' value='15' size='3'/> seconds | ||
<input type='button' id='perfFlameGraphSubmit' value='Start Sampling'/> | ||
</div> | ||
<div class='perfFlameGraph' style='overflow:auto'> | ||
</div> | ||
`); | ||
|
||
$('#perfFlameGraphSubmit').on('click', function() { | ||
$(id + " .perfFlameGraph").html(`Sampling ${host}...`); | ||
|
||
pAPI.probe(host, 'perf', function(probe, h, input) { | ||
$(id + " .perfFlameGraph") | ||
.height($(id).height() - $(id + " .rendererForm").outerHeight()) | ||
.html(input.stdout) | ||
.scrollTop($(id + ' .perfFlameGraph')[0].scrollHeight); | ||
}, function(e, probe, h) { | ||
$(id+ " .perfFlameGraph").html('ERROR: Fetching perf data failed!'); | ||
console.error(`probe Error: host=${h} probe=${probe} ${e}`); | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.