MCPcopy Create free account
hub / github.com/elastic/devfiler / new

Method new

src/ui/app.rs:60–88  ·  view source on GitHub ↗
(collector: Collector)

Source from the content-addressed store, hash-verified

58
59impl 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| {

Callers

nothing calls this directly

Calls 1

count_estimateMethod · 0.80

Tested by

no test coverage detected