Skip to content

Commit

Permalink
Merge pull request #85 from humanmade/flamegraph-improvements
Browse files Browse the repository at this point in the history
Flamegraph improvements
  • Loading branch information
shadyvb authored Oct 11, 2022
2 parents 2a531bb + 40b6ad0 commit 67008d6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
14 changes: 8 additions & 6 deletions assets/flamegraph.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions inc/query_monitor/class-output-flamegraph-html.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,30 @@ public function output() {
<?php endif ?>
</h2>
</caption>
<style>
.aws-xray-flamegraph {
width: 100%;
}

.d3-flame-graph rect {
stroke: #fff;
}

.d3-flame-graph foreignObject {
cursor: pointer;
}

.d3-flame-graph foreignObject:hover {
background-color: rgba( 255, 255, 255, 0.3 );
}

.d3-flame-graph foreignObject div {
margin: 0 3px;
color: #000;
font-size: 10px;
overflow: hidden;
}
</style>
<div class="aws-xray-flamegraph"><?php echo wp_json_encode( $xhprof ) ?></div>
<?php

Expand Down

0 comments on commit 67008d6

Please sign in to comment.