mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:27:43 +00:00
ProfileViewer: Add mode that shows percentages instead of sample counts
Sometimes it's much nicer to work with percentages than raw sample counts when browsing through a profile. :^)
This commit is contained in:
parent
8effe0b632
commit
058cd1241e
4 changed files with 37 additions and 4 deletions
|
@ -126,6 +126,8 @@ public:
|
|||
Vector<Frame> frames;
|
||||
};
|
||||
|
||||
u32 filtered_event_count() const { return m_filtered_event_count; }
|
||||
|
||||
const Vector<Event>& events() const { return m_events; }
|
||||
|
||||
u64 length_in_ms() const { return m_last_timestamp - m_first_timestamp; }
|
||||
|
@ -140,6 +142,9 @@ public:
|
|||
bool is_inverted() const { return m_inverted; }
|
||||
void set_inverted(bool);
|
||||
|
||||
bool show_percentages() const { return m_show_percentages; }
|
||||
void set_show_percentages(bool);
|
||||
|
||||
private:
|
||||
explicit Profile(Vector<Event>);
|
||||
|
||||
|
@ -147,6 +152,7 @@ private:
|
|||
|
||||
RefPtr<ProfileModel> m_model;
|
||||
Vector<NonnullRefPtr<ProfileNode>> m_roots;
|
||||
u32 m_filtered_event_count { 0 };
|
||||
u64 m_first_timestamp { 0 };
|
||||
u64 m_last_timestamp { 0 };
|
||||
|
||||
|
@ -158,4 +164,5 @@ private:
|
|||
|
||||
u32 m_deepest_stack_depth { 0 };
|
||||
bool m_inverted { false };
|
||||
bool m_show_percentages { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue