From d084f8d90addad7bcbd086955ad0cc397967a399 Mon Sep 17 00:00:00 2001 From: Jakub Berkop Date: Thu, 17 Feb 2022 22:26:20 +0100 Subject: 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. --- Userland/DevTools/Profiler/main.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Userland/DevTools/Profiler/main.cpp') 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 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("Filesystem events")); + filesystem_events_tab->set_layout(); + filesystem_events_tab->layout()->set_margins(4); + + auto filesystem_events_tree_view = TRY(filesystem_events_tab->try_add()); + 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(); }))); -- cgit v1.2.3