#memory #memory-object #heapsize #memory-usage #memory-profiling

无需 std size-of

一个用于测量对象总内存使用的crate

6次发布

0.1.5 2023年2月23日
0.1.4 2022年11月4日
0.1.3 2022年10月21日
0.1.1 2022年9月14日

#128 in 性能分析

Download history 49/week @ 2024-04-02 7/week @ 2024-04-09 1/week @ 2024-04-16 6/week @ 2024-04-23 1/week @ 2024-05-14 16/week @ 2024-05-21 33/week @ 2024-05-28 17/week @ 2024-06-04 17/week @ 2024-06-11 14/week @ 2024-06-18 25/week @ 2024-06-25 36/week @ 2024-07-02 125/week @ 2024-07-09 171/week @ 2024-07-16

362 次每月下载
3 个crate中使用 (2 个直接使用)

MIT/Apache

73KB
2K SLoC

Size Of

一个用于在运行时测量对象总内存使用的crate

功能

size-of 内置支持许多第三方crate,可以通过功能标志启用

  • std: 启用对Rust标准库的支持(默认启用,当禁用时,size-of 兼容 #![no_std]
  • derive: 启用对 #[derive(SizeOf)] 的支持(默认启用)
  • time: 启用对 time crate 的支持
    • time-std: 启用对 timestd 功能的支持
  • chrono: 启用对 chrono crate 的支持
  • hashbrown: 启用对 hashbrown crate 的支持
  • fxhash: 启用对 fxhash crate 的支持
  • rust_decimal: 启用对 rust_decimal crate 的支持
  • ordered-float: 启用对 ordered-float crate 的支持
  • ahash: 启用对 ahash crate 的支持
    • ahash-std:启用对 ahashstd 功能的支持
  • xxhash-rust:启用对 xxhash-rust 包的支持
    • xxhash-xxh32:启用对 xxhhash-rustxxh32 功能的支持
    • xxhash-xxh64:启用对 xxhhash-rustxxh64 功能的支持
    • xxhash-xxh3:启用对 xxhhash-rustxxh3 功能的支持

依赖项

~0–1.3MB
~23K SLoC