aboutsummaryrefslogtreecommitdiff
path: root/vendor/backtrace/benches
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
committerValentin Popov <valentin@popov.link>2024-07-19 15:37:58 +0300
commita990de90fe41456a23e58bd087d2f107d321f3a1 (patch)
tree15afc392522a9e85dc3332235e311b7d39352ea9 /vendor/backtrace/benches
parent3d48cd3f81164bbfc1a755dc1d4a9a02f98c8ddd (diff)
downloadfparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.tar.xz
fparkan-a990de90fe41456a23e58bd087d2f107d321f3a1.zip
Deleted vendor folder
Diffstat (limited to 'vendor/backtrace/benches')
-rw-r--r--vendor/backtrace/benches/benchmarks.rs92
1 files changed, 0 insertions, 92 deletions
diff --git a/vendor/backtrace/benches/benchmarks.rs b/vendor/backtrace/benches/benchmarks.rs
deleted file mode 100644
index e14e733..0000000
--- a/vendor/backtrace/benches/benchmarks.rs
+++ /dev/null
@@ -1,92 +0,0 @@
-#![feature(test)]
-
-extern crate test;
-
-#[cfg(feature = "std")]
-use backtrace::Backtrace;
-
-#[bench]
-#[cfg(feature = "std")]
-fn trace(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function() {
- backtrace::trace(|frame| {
- let ip = frame.ip();
- test::black_box(ip);
- true
- });
- }
- b.iter(the_function);
-}
-
-#[bench]
-#[cfg(feature = "std")]
-fn trace_and_resolve_callback(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function() {
- backtrace::trace(|frame| {
- backtrace::resolve(frame.ip(), |symbol| {
- let addr = symbol.addr();
- test::black_box(addr);
- });
- true
- });
- }
- b.iter(the_function);
-}
-
-#[bench]
-#[cfg(feature = "std")]
-fn trace_and_resolve_separate(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function(frames: &mut Vec<*mut std::ffi::c_void>) {
- backtrace::trace(|frame| {
- frames.push(frame.ip());
- true
- });
- frames.iter().for_each(|frame_ip| {
- backtrace::resolve(*frame_ip, |symbol| {
- test::black_box(symbol);
- });
- });
- }
- let mut frames = Vec::with_capacity(1024);
- b.iter(|| {
- the_function(&mut frames);
- frames.clear();
- });
-}
-
-#[bench]
-#[cfg(feature = "std")]
-fn new_unresolved(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function() {
- let bt = Backtrace::new_unresolved();
- test::black_box(bt);
- }
- b.iter(the_function);
-}
-
-#[bench]
-#[cfg(feature = "std")]
-fn new(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function() {
- let bt = Backtrace::new();
- test::black_box(bt);
- }
- b.iter(the_function);
-}
-
-#[bench]
-#[cfg(feature = "std")]
-fn new_unresolved_and_resolve_separate(b: &mut test::Bencher) {
- #[inline(never)]
- fn the_function() {
- let mut bt = Backtrace::new_unresolved();
- bt.resolve();
- test::black_box(bt);
- }
- b.iter(the_function);
-}