-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove extreneous
image
features and dependencies (#1425)
* Cut out all image dependencies except for png and jpeg * Small refactor of re_log: split out a file * deny.toml: remove recursive exceptions for `ring` and `winit` * ci: cargo deny check all four target platforms * fix cargo deny CI snafu * Still I messed up the CI command
- Loading branch information
Showing
13 changed files
with
98 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
//! Function to setup logging in binaries and web apps. | ||
/// Set `RUST_LOG` environment variable to `info`, unless set, | ||
/// and also set some other log levels on crates that are too loud. | ||
#[cfg(not(target_arch = "wasm32"))] | ||
fn set_default_rust_log_env() { | ||
let mut rust_log = std::env::var("RUST_LOG").unwrap_or_else(|_| "info".to_owned()); | ||
|
||
const LOUD_CRATES: [&str; 7] = [ | ||
// wgpu crates spam a lot on info level, which is really annoying | ||
// TODO(emilk): remove once https://github.com/gfx-rs/wgpu/issues/3206 is fixed | ||
"naga", | ||
"wgpu_core", | ||
"wgpu_hal", | ||
// These are quite spammy on debug, drowning out what we care about: | ||
"h2", | ||
"hyper", | ||
"rustls", | ||
"ureq", | ||
]; | ||
for loud_crate in LOUD_CRATES { | ||
if !rust_log.contains(&format!("{loud_crate}=")) { | ||
rust_log += &format!(",{loud_crate}=warn"); | ||
} | ||
} | ||
|
||
std::env::set_var("RUST_LOG", rust_log); | ||
|
||
if std::env::var("RUST_BACKTRACE").is_err() { | ||
// Make sure we always produce backtraces for the (hopefully rare) cases when we crash! | ||
std::env::set_var("RUST_BACKTRACE", "1"); | ||
} | ||
} | ||
|
||
#[cfg(not(target_arch = "wasm32"))] | ||
pub fn setup_native_logging() { | ||
set_default_rust_log_env(); | ||
tracing_subscriber::fmt::init(); // log to stdout | ||
} | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
fn default_web_log_filter() -> String { | ||
"debug,naga=warn,wgpu_core=warn,wgpu_hal=warn".to_owned() | ||
} | ||
|
||
#[cfg(target_arch = "wasm32")] | ||
pub fn setup_web_logging() { | ||
use tracing_subscriber::layer::SubscriberExt as _; | ||
tracing::subscriber::set_global_default( | ||
tracing_subscriber::Registry::default() | ||
.with(tracing_subscriber::EnvFilter::new(default_web_log_filter())) | ||
.with(tracing_wasm::WASMLayer::new( | ||
tracing_wasm::WASMLayerConfig::default(), | ||
)), | ||
) | ||
.expect("Failed to set tracing subscriber."); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
a6ae6cd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rust Benchmark
datastore/insert/batch/rects/insert
565239
ns/iter (± 10240
)552839
ns/iter (± 1555
)1.02
datastore/latest_at/batch/rects/query
1828
ns/iter (± 7
)1858
ns/iter (± 3
)0.98
datastore/latest_at/missing_components/primary
355
ns/iter (± 0
)360
ns/iter (± 0
)0.99
datastore/latest_at/missing_components/secondaries
424
ns/iter (± 1
)441
ns/iter (± 0
)0.96
datastore/range/batch/rects/query
152332
ns/iter (± 250
)153205
ns/iter (± 175
)0.99
mono_points_arrow/generate_message_bundles
51191698
ns/iter (± 955801
)51667143
ns/iter (± 776479
)0.99
mono_points_arrow/generate_messages
136997970
ns/iter (± 2255304
)136529036
ns/iter (± 1368618
)1.00
mono_points_arrow/encode_log_msg
167925911
ns/iter (± 1184384
)164915682
ns/iter (± 1272510
)1.02
mono_points_arrow/encode_total
357179621
ns/iter (± 2266465
)355000661
ns/iter (± 1569681
)1.01
mono_points_arrow/decode_log_msg
188321496
ns/iter (± 1188677
)187507888
ns/iter (± 1253201
)1.00
mono_points_arrow/decode_message_bundles
73647285
ns/iter (± 1285935
)73421272
ns/iter (± 990524
)1.00
mono_points_arrow/decode_total
259513976
ns/iter (± 2540226
)255685610
ns/iter (± 1671829
)1.01
batch_points_arrow/generate_message_bundles
332860
ns/iter (± 762
)331315
ns/iter (± 940
)1.00
batch_points_arrow/generate_messages
6271
ns/iter (± 14
)6235
ns/iter (± 32
)1.01
batch_points_arrow/encode_log_msg
357590
ns/iter (± 3199
)373073
ns/iter (± 1054
)0.96
batch_points_arrow/encode_total
711172
ns/iter (± 3328
)728315
ns/iter (± 1973
)0.98
batch_points_arrow/decode_log_msg
350382
ns/iter (± 1271
)348473
ns/iter (± 2147
)1.01
batch_points_arrow/decode_message_bundles
2127
ns/iter (± 14
)2067
ns/iter (± 13
)1.03
batch_points_arrow/decode_total
356806
ns/iter (± 1498
)353838
ns/iter (± 1559
)1.01
arrow_mono_points/insert
6836053421
ns/iter (± 16533220
)7067218254
ns/iter (± 93773459
)0.97
arrow_mono_points/query
1738813
ns/iter (± 14276
)1757357
ns/iter (± 11032
)0.99
arrow_batch_points/insert
2667543
ns/iter (± 10026
)2700572
ns/iter (± 18266
)0.99
arrow_batch_points/query
17655
ns/iter (± 29
)16816
ns/iter (± 54
)1.05
tuid/Tuid::random
34
ns/iter (± 0
)34
ns/iter (± 0
)1
This comment was automatically generated by workflow using github-action-benchmark.