update benchmark

This commit is contained in:
Evan Almloff committed 2022-04-21 06:44:48 -05:00
1 parent efa682735e
commit 91b2147552
2 files changed
+15 -60

No files matched your search

+8 -56
View File
@@ -17,62 +17,14 @@ fn tui_update(c: &mut Criterion) {
&size, &size,
|b, size| { |b, size| {
b.iter(|| match size { b.iter(|| match size {
1 => dioxus::tui::launch_cfg( 1 => dioxus::tui::launch_cfg(app3, Config::default().with_headless()),
app3, 2 => dioxus::tui::launch_cfg(app6, Config::default().with_headless()),
Config { 3 => dioxus::tui::launch_cfg(app9, Config::default().with_headless()),
headless: true, 4 => dioxus::tui::launch_cfg(app12, Config::default().with_headless()),
..Default::default() 5 => dioxus::tui::launch_cfg(app15, Config::default().with_headless()),
}, 6 => dioxus::tui::launch_cfg(app18, Config::default().with_headless()),
), 7 => dioxus::tui::launch_cfg(app21, Config::default().with_headless()),
2 => dioxus::tui::launch_cfg( 8 => dioxus::tui::launch_cfg(app24, Config::default().with_headless()),
app6,
Config {
headless: true,
..Default::default()
},
),
3 => dioxus::tui::launch_cfg(
app9,
Config {
headless: true,
..Default::default()
},
),
4 => dioxus::tui::launch_cfg(
app12,
Config {
headless: true,
..Default::default()
},
),
5 => dioxus::tui::launch_cfg(
app15,
Config {
headless: true,
..Default::default()
},
),
6 => dioxus::tui::launch_cfg(
app18,
Config {
headless: true,
..Default::default()
},
),
7 => dioxus::tui::launch_cfg(
app21,
Config {
headless: true,
..Default::default()
},
),
8 => dioxus::tui::launch_cfg(
app24,
Config {
headless: true,
..Default::default()
},
),
_ => (), _ => (),
}) })
}, },
+7 -4
View File
@@ -21,15 +21,18 @@ impl Config {
} }
} }
pub fn with_ctrl_c_quit(self, ctrl_c_quit: bool) -> Self { pub fn with_ctrl_c_quit(self) -> Self {
Self { Self {
ctrl_c_quit, ctrl_c_quit: true,
..self ..self
} }
} }
pub fn with_headless(self, headless: bool) -> Self { pub fn with_headless(self) -> Self {
Self { headless, ..self } Self {
headless: true,
..self
}
} }
} }