Skip to content

Commit

Permalink
Point users to our troubleshooting page on panic (#1338)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Feb 17, 2023
1 parent 1184c20 commit eda4854
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions crates/rerun/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ fn run_analytics(cmd: &AnalyticsCommands) -> Result<(), re_analytics::cli::CliEr
}

async fn run_impl(call_source: CallSource, args: Args) -> anyhow::Result<()> {
install_panic_hook();

let mut profiler = re_viewer::Profiler::default();
if args.profile {
profiler.start();
Expand Down Expand Up @@ -330,3 +332,17 @@ fn parse_max_latency(max_latency: Option<&String>) -> f32 {
.unwrap_or_else(|err| panic!("Failed to parse max_latency ({max_latency:?}): {err}"))
})
}

fn install_panic_hook() {
let previous_panic_hook = std::panic::take_hook();

std::panic::set_hook(Box::new(move |panic_info: &std::panic::PanicInfo<'_>| {
// The prints the callstack etc
(*previous_panic_hook)(panic_info);

eprintln!(
"\n\
Troubleshooting Rerun: https://www.rerun.io/docs/getting-started/troubleshooting"
);
}));
}

1 comment on commit eda4854

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rust Benchmark

Benchmark suite Current: eda4854 Previous: 1184c20 Ratio
datastore/insert/batch/rects/insert 548776 ns/iter (± 1849) 543732 ns/iter (± 1472) 1.01
datastore/latest_at/batch/rects/query 1761 ns/iter (± 1) 1770 ns/iter (± 9) 0.99
datastore/latest_at/missing_components/primary 359 ns/iter (± 0) 352 ns/iter (± 0) 1.02
datastore/latest_at/missing_components/secondaries 421 ns/iter (± 0) 422 ns/iter (± 4) 1.00
datastore/range/batch/rects/query 151460 ns/iter (± 186) 148925 ns/iter (± 262) 1.02
mono_points_arrow/generate_message_bundles 50807424 ns/iter (± 832605) 45766444 ns/iter (± 667434) 1.11
mono_points_arrow/generate_messages 136213328 ns/iter (± 1620587) 123453410 ns/iter (± 1130471) 1.10
mono_points_arrow/encode_log_msg 162471056 ns/iter (± 1690214) 151097276 ns/iter (± 826829) 1.08
mono_points_arrow/encode_total 352702178 ns/iter (± 3153561) 322333609 ns/iter (± 1704390) 1.09
mono_points_arrow/decode_log_msg 182237370 ns/iter (± 1180529) 173611485 ns/iter (± 694170) 1.05
mono_points_arrow/decode_message_bundles 75718444 ns/iter (± 1267535) 63510920 ns/iter (± 697730) 1.19
mono_points_arrow/decode_total 256583566 ns/iter (± 2560090) 235069316 ns/iter (± 1457739) 1.09
batch_points_arrow/generate_message_bundles 329841 ns/iter (± 610) 325088 ns/iter (± 320) 1.01
batch_points_arrow/generate_messages 6149 ns/iter (± 14) 6150 ns/iter (± 11) 1.00
batch_points_arrow/encode_log_msg 356339 ns/iter (± 1840) 354547 ns/iter (± 1702) 1.01
batch_points_arrow/encode_total 715182 ns/iter (± 3767) 703962 ns/iter (± 2397) 1.02
batch_points_arrow/decode_log_msg 350055 ns/iter (± 1460) 346762 ns/iter (± 704) 1.01
batch_points_arrow/decode_message_bundles 2036 ns/iter (± 5) 2031 ns/iter (± 33) 1.00
batch_points_arrow/decode_total 349053 ns/iter (± 1839) 353949 ns/iter (± 816) 0.99
arrow_mono_points/insert 7022097143 ns/iter (± 39133685) 5949917133 ns/iter (± 15028800) 1.18
arrow_mono_points/query 1695068 ns/iter (± 23339) 1683406 ns/iter (± 11142) 1.01
arrow_batch_points/insert 2657177 ns/iter (± 92778) 2627281 ns/iter (± 12276) 1.01
arrow_batch_points/query 16555 ns/iter (± 90) 16708 ns/iter (± 38) 0.99
tuid/Tuid::random 34 ns/iter (± 0) 34 ns/iter (± 0) 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.