1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:47:35 +00:00

Profiler: Show one timeline per process :^)

Instead of smashing together all the samples into a single timeline,
make one per process and put them all in a ScrollableContainerWidget.

This makes it much easier to see which processes were active and when.
No timeline is displayed for processes with zero samples in the profile.
This commit is contained in:
Andreas Kling 2021-05-06 18:44:31 +02:00
parent 017da44ac2
commit 9273054b2b
3 changed files with 35 additions and 4 deletions

View file

@ -10,6 +10,7 @@
namespace Profiler {
class Process;
class Profile;
class ProfileTimelineWidget final : public GUI::Frame {
@ -23,11 +24,12 @@ private:
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void mouseup_event(GUI::MouseEvent&) override;
explicit ProfileTimelineWidget(Profile&);
explicit ProfileTimelineWidget(Profile&, Process const&);
u64 timestamp_at_x(int x) const;
Profile& m_profile;
Process const& m_process;
bool m_selecting { false };
u64 m_select_start_time { 0 };