summaryrefslogtreecommitdiff
path: root/Userland/DevTools/Profiler/main.cpp
diff options
context:
space:
mode:
authorJakub Berkop <jakub.berkop@gmail.com>2022-02-17 22:26:20 +0100
committerAndreas Kling <kling@serenityos.org>2022-03-05 21:47:01 +0100
commitd084f8d90addad7bcbd086955ad0cc397967a399 (patch)
treebf36716f292df598aa8c32a3ff24ff04743cf6b5 /Userland/DevTools/Profiler/main.cpp
parentbc82b3eaeca5b60d6e345af78c4ef9c311f6f0d6 (diff)
downloadserenity-d084f8d90addad7bcbd086955ad0cc397967a399.zip
Profiler: Present read event info in tree structure
This commit adds "Filesystem Events" View to the Profiler. This tab will present combined information for recorded Filesystem events. Currently only accumulated count and duration is presented. Duration amount currently only shows events that took over 1ms, which means that in most cases 0 is show.
Diffstat (limited to 'Userland/DevTools/Profiler/main.cpp')
-rw-r--r--Userland/DevTools/Profiler/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Userland/DevTools/Profiler/main.cpp b/Userland/DevTools/Profiler/main.cpp
index 59ace5eee7..3fd79f0b75 100644
--- a/Userland/DevTools/Profiler/main.cpp
+++ b/Userland/DevTools/Profiler/main.cpp
@@ -252,6 +252,16 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
timeline_view->on_selection_change = [&] { statusbar_update(); };
flamegraph_view->on_hover_change = [&] { statusbar_update(); };
+ auto filesystem_events_tab = TRY(tab_widget->try_add_tab<GUI::Widget>("Filesystem events"));
+ filesystem_events_tab->set_layout<GUI::VerticalBoxLayout>();
+ filesystem_events_tab->layout()->set_margins(4);
+
+ auto filesystem_events_tree_view = TRY(filesystem_events_tab->try_add<GUI::TreeView>());
+ filesystem_events_tree_view->set_should_fill_selected_rows(true);
+ filesystem_events_tree_view->set_column_headers_visible(true);
+ filesystem_events_tree_view->set_selection_behavior(GUI::TreeView::SelectionBehavior::SelectRows);
+ filesystem_events_tree_view->set_model(profile->file_event_model());
+
auto file_menu = TRY(window->try_add_menu("&File"));
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));