-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stack trace and profiler outputs
- Loading branch information
Showing
11 changed files
with
140 additions
and
15 deletions.
There are no files selected for viewing
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,20 @@ | ||
H2O.ProfileOutput = (_, _profile) -> | ||
_activeNode = signal null | ||
|
||
createNode = (index, count, stackTrace) -> | ||
display = -> _activeNode self | ||
|
||
self = | ||
name: "Node #{index}" | ||
caption: "Node #{index} (Count: #{count})" | ||
stackTrace: stackTrace | ||
display: display | ||
|
||
_nodes = for stackTrace, i in _profile.stacktraces | ||
createNode i, _profile.counts[i], stackTrace | ||
|
||
_activeNode head _nodes | ||
|
||
nodes: _nodes | ||
activeNode: _activeNode | ||
template: 'flow-profile-output' |
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,16 @@ | ||
.flow-widget.flow-profile-output | ||
h3.flow-hint | ||
i.fa.fa-wrench | ||
span Profiler | ||
|
||
div | ||
| Select Node: | ||
select(data-bind="options:nodes, optionsText:'name', value:activeNode, optionsCaption:'(Select)'") | ||
|
||
// ko with:activeNode | ||
h4(data-bind='text:caption') | ||
pre(data-bind='text:stackTrace') | ||
// /ko | ||
// /ko | ||
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,27 @@ | ||
H2O.StackTraceOutput = (_, _stackTrace) -> | ||
_activeNode = signal null | ||
|
||
createThread = (thread) -> | ||
lines = split thread, '\n' | ||
|
||
title: head lines | ||
stackTrace: join (tail lines), '\n' | ||
|
||
createNode = (node) -> | ||
display = -> _activeNode self | ||
|
||
self = | ||
name: node._node | ||
timestamp: new Date node._time | ||
threads: (createThread thread for thread in node._traces) | ||
display: display | ||
|
||
_nodes = for node in _stackTrace.traces | ||
createNode node | ||
|
||
_activeNode head _nodes | ||
|
||
nodes: _nodes | ||
activeNode: _activeNode | ||
template: 'flow-stacktrace-output' | ||
|
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,18 @@ | ||
.flow-widget.flow-stacktrace-output | ||
h3.flow-hint | ||
i.fa.fa-wrench | ||
span Stack Trace | ||
|
||
div | ||
| Select Node: | ||
select(data-bind="options:nodes, optionsText:'name', value:activeNode, optionsCaption:'(Select)'") | ||
|
||
|
||
// ko with:activeNode | ||
h4(data-bind='text:timestamp') | ||
// ko foreach:threads | ||
h5(data-bind='text:title') | ||
pre(data-bind='text:stackTrace') | ||
// /ko | ||
// /ko | ||
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
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