Skip to content

Commit

Permalink
Show the class name in the JS output
Browse files Browse the repository at this point in the history
  • Loading branch information
joerick committed Oct 18, 2022
1 parent 25dc2cc commit de27b00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
9 changes: 8 additions & 1 deletion html_renderer/src/Frame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:style="timeStyle">
{{formattedTime}}
</div>
<div class="name">{{frame.function}}</div>
<div class="name">{{name}}</div>
<div class="spacer" style="flex: 1"></div>
<div class="code-position">
{{codePosition}}
Expand Down Expand Up @@ -69,6 +69,13 @@ export default {
}
},
computed: {
name() {
if (this.frame.className) {
return `${this.frame.className}.${this.frame.function}`;
} else {
return this.frame.function
}
},
isVisible() {
if (!this.frame.group) {
return true;
Expand Down
1 change: 1 addition & 0 deletions html_renderer/src/model/Frame.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class Frame {
this.time = jsonObject.time;
this.totalTime = this.parent ? this.parent.totalTime : this.time;
this.isApplicationCode = jsonObject.is_application_code
this.className = jsonObject.class_name;

if (jsonObject.group_id) {
const groupId = jsonObject.group_id;
Expand Down
4 changes: 2 additions & 2 deletions pyinstrument/renderers/html_resources/app.js

Large diffs are not rendered by default.

0 comments on commit de27b00

Please sign in to comment.