Skip to content

Commit

Permalink
Analytics: Rename "location" to "file_line" in the "crash-panic" event (
Browse files Browse the repository at this point in the history
#1575)

* Analytics: Rename "location" to "file_line" in the "crash-panic" event

* debug-assert that we don't use the same name
  • Loading branch information
emilk authored Mar 13, 2023
1 parent bc7cbaf commit ec4eb6d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion crates/re_analytics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,20 @@ impl Event {
}
}

/// NOTE: due to an earlier snafu, we filter out all properties called
/// `git_branch` and `location` on the server-end, so don't use those property names!
/// See <https://github.com/rerun-io/rerun/pull/1563> for details.
pub fn with_prop(
mut self,
name: impl Into<Cow<'static, str>>,
value: impl Into<Property>,
) -> Self {
self.props.insert(name.into(), value.into());
let name = name.into();
debug_assert!(
name != "git_branch" && name != "location",
"We filter out the property name {name:?} on the server-end. Pick a different name."
);
self.props.insert(name, value.into());
self
}

Expand Down
2 changes: 1 addition & 1 deletion crates/rerun/src/crash_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn install_panic_hook(_build_info: BuildInfo) {
if let Some(location) = panic_info.location() {
let file =
anonymize_source_file_path(&std::path::PathBuf::from(location.file()));
event = event.with_prop("location", format!("{file}:{}", location.line()));
event = event.with_prop("file_line", format!("{file}:{}", location.line()));
}

analytics.record(event);
Expand Down

1 comment on commit ec4eb6d

@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: ec4eb6d Previous: bc7cbaf Ratio
datastore/insert/batch/rects/insert 553021 ns/iter (± 1627) 579740 ns/iter (± 7602) 0.95
datastore/latest_at/batch/rects/query 1851 ns/iter (± 7) 1844 ns/iter (± 15) 1.00
datastore/latest_at/missing_components/primary 294 ns/iter (± 0) 285 ns/iter (± 0) 1.03
datastore/latest_at/missing_components/secondaries 434 ns/iter (± 0) 434 ns/iter (± 0) 1
datastore/range/batch/rects/query 151566 ns/iter (± 323) 150719 ns/iter (± 252) 1.01
mono_points_arrow/generate_message_bundles 50523767 ns/iter (± 667107) 49805612 ns/iter (± 838100) 1.01
mono_points_arrow/generate_messages 136998737 ns/iter (± 1323155) 129708152 ns/iter (± 2568544) 1.06
mono_points_arrow/encode_log_msg 167005873 ns/iter (± 1011076) 165734514 ns/iter (± 2108475) 1.01
mono_points_arrow/encode_total 355230733 ns/iter (± 1927888) 349363067 ns/iter (± 4810169) 1.02
mono_points_arrow/decode_log_msg 187260529 ns/iter (± 1048340) 184119800 ns/iter (± 1545204) 1.02
mono_points_arrow/decode_message_bundles 74102518 ns/iter (± 950017) 68218500 ns/iter (± 828938) 1.09
mono_points_arrow/decode_total 256823308 ns/iter (± 1720062) 249108334 ns/iter (± 2662654) 1.03
batch_points_arrow/generate_message_bundles 331816 ns/iter (± 712) 334406 ns/iter (± 753) 0.99
batch_points_arrow/generate_messages 6285 ns/iter (± 13) 6336 ns/iter (± 24) 0.99
batch_points_arrow/encode_log_msg 367146 ns/iter (± 1370) 377411 ns/iter (± 1588) 0.97
batch_points_arrow/encode_total 716959 ns/iter (± 2214) 746527 ns/iter (± 22431) 0.96
batch_points_arrow/decode_log_msg 346112 ns/iter (± 1645) 358976 ns/iter (± 2290) 0.96
batch_points_arrow/decode_message_bundles 2090 ns/iter (± 9) 2128 ns/iter (± 12) 0.98
batch_points_arrow/decode_total 351271 ns/iter (± 7536) 370009 ns/iter (± 4654) 0.95
arrow_mono_points/insert 6907575239 ns/iter (± 18307363) 6644810311 ns/iter (± 124769190) 1.04
arrow_mono_points/query 1779692 ns/iter (± 27069) 1872924 ns/iter (± 29224) 0.95
arrow_batch_points/insert 2666087 ns/iter (± 37485) 2875578 ns/iter (± 65334) 0.93
arrow_batch_points/query 16898 ns/iter (± 15) 16928 ns/iter (± 19) 1.00
arrow_batch_vecs/insert 43160 ns/iter (± 136) 42498 ns/iter (± 122) 1.02
arrow_batch_vecs/query 505690 ns/iter (± 739) 506865 ns/iter (± 647) 1.00
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.