(collector: Collector)
| 58 | |
| 59 | impl DevfilerUi { |
| 60 | pub fn new(collector: Collector) -> Self { |
| 61 | DevfilerUi { |
| 62 | active_tab: Tab::FlameGraph, |
| 63 | tabs: vec![ |
| 64 | Box::new(tabs::FlameGraphTab::default()), |
| 65 | Box::new(tabs::FlameScopeTab::default()), |
| 66 | Box::new(tabs::TopFuncsTab::default()), |
| 67 | Box::new(tabs::ExecutablesTab::default()), |
| 68 | Box::new(tabs::LogTab::default()), |
| 69 | // Keep dev mode tabs below. |
| 70 | Box::new(tabs::TraceFreqTab::default()), |
| 71 | Box::new(tabs::DbStatsTab::default()), |
| 72 | Box::new(tabs::GrpcLogTab::default()), |
| 73 | ], |
| 74 | sample_agg_cache: Cached::default(), |
| 75 | cfg: DevfilerConfig { |
| 76 | collector, |
| 77 | #[cfg(feature = "default-dev-mode")] |
| 78 | dev_mode: true, |
| 79 | #[cfg(not(feature = "default-dev-mode"))] |
| 80 | dev_mode: false, |
| 81 | }, |
| 82 | show_add_data_window: DB.stack_traces.count_estimate() == 0, |
| 83 | md_cache: CommonMarkCache::default(), |
| 84 | auto_scroll_time: Some(Duration::try_minutes(15).unwrap()), |
| 85 | kind: SampleKind::Mixed, |
| 86 | requested_time_range: None, |
| 87 | } |
| 88 | } |
| 89 | |
| 90 | fn draw_main_window(&mut self, ctx: &egui::Context) { |
| 91 | egui::CentralPanel::default().show(ctx, |ui| { |
nothing calls this directly
no test coverage detected