fix js framework benchmark
This commit is contained in:
1 parent
a10f9496c7
commit
74ec3a4a82
2 files changed
+4
-4
No files matched your search
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
use criterion::{criterion_group, criterion_main, Criterion};
|
use criterion::{criterion_group, criterion_main, Criterion};
|
||||||
use dioxus::prelude::*;
|
use dioxus::prelude::*;
|
||||||
|
use dioxus_core::NoOpMutations;
|
||||||
use rand::prelude::*;
|
use rand::prelude::*;
|
||||||
|
|
||||||
criterion_group!(mbenches, create_rows);
|
criterion_group!(mbenches, create_rows);
|
||||||
@@ -30,8 +31,7 @@ fn create_rows(c: &mut Criterion) {
|
|||||||
let _ = dom.rebuild(&mut dioxus_core::NoOpMutations);
|
let _ = dom.rebuild(&mut dioxus_core::NoOpMutations);
|
||||||
|
|
||||||
b.iter(|| {
|
b.iter(|| {
|
||||||
let g = dom.rebuild(&mut ());
|
dom.rebuild(&mut NoOpMutations);
|
||||||
assert!(g.edits.len() > 1);
|
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,13 +170,13 @@ pub fn launch(app: fn() -> Element) {
|
|||||||
LaunchBuilder::new().launch(app)
|
LaunchBuilder::new().launch(app)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "web"))]
|
#[cfg(feature = "web")]
|
||||||
/// Launch your web application without any additional configuration. See [`LaunchBuilder`] for more options.
|
/// Launch your web application without any additional configuration. See [`LaunchBuilder`] for more options.
|
||||||
pub fn launch_web(app: fn() -> Element) {
|
pub fn launch_web(app: fn() -> Element) {
|
||||||
LaunchBuilder::web().launch(app)
|
LaunchBuilder::web().launch(app)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(all(feature = "desktop"))]
|
#[cfg(feature = "desktop")]
|
||||||
/// Launch your desktop application without any additional configuration. See [`LaunchBuilder`] for more options.
|
/// Launch your desktop application without any additional configuration. See [`LaunchBuilder`] for more options.
|
||||||
pub fn launch_desktop(app: fn() -> Element) {
|
pub fn launch_desktop(app: fn() -> Element) {
|
||||||
LaunchBuilder::desktop().launch(app)
|
LaunchBuilder::desktop().launch(app)
|
||||||
|
|||||||
Reference in new issue
Block a user