Skip to content

Commit eef4226

Browse files
authored
fix(metrics): remove memory_db size metric (#2632)
`malloc_size` caused a segfault in linux and was removed.
1 parent d892434 commit eef4226

File tree

5 files changed

+3
-37
lines changed

5 files changed

+3
-37
lines changed

Cargo.lock

Lines changed: 1 addition & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ mocktopus = "0.8.0"
141141
nom = "6.1.2"
142142
num-bigint = { version = "0.4", features = ["serde", "std"] }
143143
num-rational = { version = "0.4", features = ["serde"] }
144-
parity-util-mem = "0.11"
145144
num-traits = "0.2"
146145
pairing_api = { git = "https://github.com/komodoplatform/walletconnectrust", tag = "k-0.1.3" }
147146
parking_lot = { version = "0.12.0", default-features = false }

LEGAL/THIRDPARTY-LICENSES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Apache-2.0 AND BSD-2-Clause OR MIT (2): crossbeam-channel, crossbeam-queue
66
Apache-2.0 OR Apache-2.0 WITH LLVM-exception OR MIT (2): wasi, wasi
77
Apache-2.0 OR BSL-1.0 (1): ryu
88
Apache-2.0 OR ISC OR MIT (4): ct-logs, hyper-rustls, rustls, sct
9-
Apache-2.0 OR MIT (343): addr2line, aead, aes, aes-gcm, ahash, ahash, ahash, ahash, anyhow, arc-swap, arrayvec, arrayvec, arrayvec, async-std, async-task, async-trait, atomic, atomic-shim, autocfg, autocfg, backtrace, base64, base64, base64, base64, bigdecimal, bimap, bitflags, blake2, block-buffer, block-buffer, block-padding, blocking, bs58, bumpalo, byte-tools, cache-padded, cc, cfg-if, cfg-if, chacha20, chacha20poly1305, chrono, cipher, concurrent-queue, console_error_panic_hook, const-random, const-random-macro, cpufeatures, cpuid-bool, crc, crc32fast, crossbeam, crossbeam-deque, crossbeam-epoch, crossbeam-utils, crypto-mac, crypto-mac, ctr, debug_stub_derive, derivative, digest, digest, dirs, dtoa, ed25519, either, enum-as-inner, env_logger, error-chain, ethabi, ethbloom, ethereum-types, fake-simd, fallible-iterator, fallible-streaming-iterator, fastrand, findshlibs, fixed-hash, fixedbitset, flate2, fnv, futures, futures, futures-channel, futures-core, futures-cpupool, futures-executor, futures-io, futures-macro, futures-rustls, futures-sink, futures-task, futures-timer, futures-util, getrandom, getrandom, ghash, gimli, gloo-timers, groestl, hashbrown, hashbrown, hashbrown, hashbrown, hashlink, hdrhistogram, hdrhistogram, heck, hermit-abi, hex, hex, hex-literal, hmac, hmac, http, http, httparse, httpdate, humantime, humantime, idna, idna, impl-codec, impl-rlp, impl-serde, impl-trait-for-tuples, indexmap, iovec, ipconfig, ipnet, itertools, itertools, itertools, itoa, js-sys, kv-log-macro, lazy_static, libc, libz-sys, linked-hash-map, lock_api, lock_api, lock_api, log, log, log-mdc, log4rs, lru-cache, match_cfg, maybe-uninit, miow, multimap, nodrop, nohash-hasher, ntapi, num, num-bigint, num-bigint, num-complex, num-derive, num-integer, num-iter, num-rational, num-rational, num-traits, num-traits, num_cpus, object, once_cell, opaque-debug, opaque-debug, parity-send-wrapper, parity-util-mem, parking, parking_lot, parking_lot, parking_lot, parking_lot, parking_lot_core, parking_lot_core, parking_lot_core, parking_lot_core, paste, percent-encoding, percent-encoding, pest, petgraph, pin-project, pin-project, pin-project-internal, pin-project-internal, pin-project-lite, pin-project-lite, pin-utils, pkg-config, poly1305, polyval, ppv-lite86, primitive-types, proc-macro-crate, proc-macro-crate, proc-macro-error, proc-macro-error-attr, proc-macro-hack, proc-macro-nested, proc-macro2, quick-error, quicksink, quote, quote, rand, rand, rand, rand, rand, rand_chacha, rand_chacha, rand_chacha, rand_core, rand_core, rand_core, rand_core, rand_hc, rand_hc, rand_hc, rand_isaac, rand_jitter, rand_os, rand_pcg, rand_pcg, rand_xorshift, rand_xoshiro, ref-cast, ref-cast-impl, regex, regex-syntax, remove_dir_all, resolv-conf, ripemd160, ripemd160, rlp, rlp, rust-argon2, rustc-demangle, rustc-hex, rustc-hex, rustc_version, rustc_version, scoped-tls, scopeguard, scopeguard, secrecy, semver, semver, semver-parser, semver-parser, send_wrapper, send_wrapper, serde, serde_bytes, serde_bytes, serde_derive, serde_json, serde_repr, serde_yaml, sha-1, sha-1, sha2, sha2, sha3, signal-hook, signal-hook-mio, signal-hook-registry, signature, siphasher, smallvec, smallvec, smol, snow, socket2, socket2, soketto, stable_deref_trait, static_assertions, syn, syn, synom, tc_cli_client, tc_coblox_bitcoincore, tc_core, tc_dynamodb_local, tc_elasticmq, tc_generic, tc_parity_parity, tc_postgres, tc_redis, tc_trufflesuite_ganachecli, tempfile, testcontainers, thiserror, thiserror-impl, thread-id, time, tokio-rustls, tokio-timer, toml, traitobject, trust-dns-proto, trust-dns-resolver, typenum, ucd-trie, uint, uint, unicode-bidi, unicode-normalization, unicode-segmentation, unicode-xid, unicode-xid, universal-hash, url, url, uuid, vcpkg, version_check, waker-fn, wasm-bindgen, wasm-bindgen-backend, wasm-bindgen-futures, wasm-bindgen-macro, wasm-bindgen-macro-support, wasm-bindgen-shared, wasm-bindgen-test, wasm-bindgen-test-macro, web-sys, widestring, winapi, winapi-i686-pc-windows-gnu, winapi-x86_64-pc-windows-gnu, yaml-rust, yamux, zeroize, zeroize_derive
9+
Apache-2.0 OR MIT (343): addr2line, aead, aes, aes-gcm, ahash, ahash, ahash, ahash, anyhow, arc-swap, arrayvec, arrayvec, arrayvec, async-std, async-task, async-trait, atomic, atomic-shim, autocfg, autocfg, backtrace, base64, base64, base64, base64, bigdecimal, bimap, bitflags, blake2, block-buffer, block-buffer, block-padding, blocking, bs58, bumpalo, byte-tools, cache-padded, cc, cfg-if, cfg-if, chacha20, chacha20poly1305, chrono, cipher, concurrent-queue, console_error_panic_hook, const-random, const-random-macro, cpufeatures, cpuid-bool, crc, crc32fast, crossbeam, crossbeam-deque, crossbeam-epoch, crossbeam-utils, crypto-mac, crypto-mac, ctr, debug_stub_derive, derivative, digest, digest, dirs, dtoa, ed25519, either, enum-as-inner, env_logger, error-chain, ethabi, ethbloom, ethereum-types, fake-simd, fallible-iterator, fallible-streaming-iterator, fastrand, findshlibs, fixed-hash, fixedbitset, flate2, fnv, futures, futures, futures-channel, futures-core, futures-cpupool, futures-executor, futures-io, futures-macro, futures-rustls, futures-sink, futures-task, futures-timer, futures-util, getrandom, getrandom, ghash, gimli, gloo-timers, groestl, hashbrown, hashbrown, hashbrown, hashbrown, hashlink, hdrhistogram, hdrhistogram, heck, hermit-abi, hex, hex, hex-literal, hmac, hmac, http, http, httparse, httpdate, humantime, humantime, idna, idna, impl-codec, impl-rlp, impl-serde, impl-trait-for-tuples, indexmap, iovec, ipconfig, ipnet, itertools, itertools, itertools, itoa, js-sys, kv-log-macro, lazy_static, libc, libz-sys, linked-hash-map, lock_api, lock_api, lock_api, log, log, log-mdc, log4rs, lru-cache, match_cfg, maybe-uninit, miow, multimap, nodrop, nohash-hasher, ntapi, num, num-bigint, num-bigint, num-complex, num-derive, num-integer, num-iter, num-rational, num-rational, num-traits, num-traits, num_cpus, object, once_cell, opaque-debug, opaque-debug, parity-send-wrapper, parking, parking_lot, parking_lot, parking_lot, parking_lot, parking_lot_core, parking_lot_core, parking_lot_core, parking_lot_core, paste, percent-encoding, percent-encoding, pest, petgraph, pin-project, pin-project, pin-project-internal, pin-project-internal, pin-project-lite, pin-project-lite, pin-utils, pkg-config, poly1305, polyval, ppv-lite86, primitive-types, proc-macro-crate, proc-macro-crate, proc-macro-error, proc-macro-error-attr, proc-macro-hack, proc-macro-nested, proc-macro2, quick-error, quicksink, quote, quote, rand, rand, rand, rand, rand, rand_chacha, rand_chacha, rand_chacha, rand_core, rand_core, rand_core, rand_core, rand_hc, rand_hc, rand_hc, rand_isaac, rand_jitter, rand_os, rand_pcg, rand_pcg, rand_xorshift, rand_xoshiro, ref-cast, ref-cast-impl, regex, regex-syntax, remove_dir_all, resolv-conf, ripemd160, ripemd160, rlp, rlp, rust-argon2, rustc-demangle, rustc-hex, rustc-hex, rustc_version, rustc_version, scoped-tls, scopeguard, scopeguard, secrecy, semver, semver, semver-parser, semver-parser, send_wrapper, send_wrapper, serde, serde_bytes, serde_bytes, serde_derive, serde_json, serde_repr, serde_yaml, sha-1, sha-1, sha2, sha2, sha3, signal-hook, signal-hook-mio, signal-hook-registry, signature, siphasher, smallvec, smallvec, smol, snow, socket2, socket2, soketto, stable_deref_trait, static_assertions, syn, syn, synom, tc_cli_client, tc_coblox_bitcoincore, tc_core, tc_dynamodb_local, tc_elasticmq, tc_generic, tc_parity_parity, tc_postgres, tc_redis, tc_trufflesuite_ganachecli, tempfile, testcontainers, thiserror, thiserror-impl, thread-id, time, tokio-rustls, tokio-timer, toml, traitobject, trust-dns-proto, trust-dns-resolver, typenum, ucd-trie, uint, uint, unicode-bidi, unicode-normalization, unicode-segmentation, unicode-xid, unicode-xid, universal-hash, url, url, uuid, vcpkg, version_check, waker-fn, wasm-bindgen, wasm-bindgen-backend, wasm-bindgen-futures, wasm-bindgen-macro, wasm-bindgen-macro-support, wasm-bindgen-shared, wasm-bindgen-test, wasm-bindgen-test-macro, web-sys, widestring, winapi, winapi-i686-pc-windows-gnu, winapi-x86_64-pc-windows-gnu, yaml-rust, yamux, zeroize, zeroize_derive
1010
Apache-2.0 OR MIT OR Zlib (2): tinyvec, tinyvec_macros
1111
BSD-2-Clause (4): Inflector, arrayref, cloudabi, cloudabi
1212
BSD-2-Clause OR MIT (1): asn1_der
@@ -16,7 +16,7 @@ BlueOak-1.0.0 (2): minicbor, minicbor-derive
1616
CC0-1.0 (6): constant_time_eq, keccak, secp256k1, secp256k1-sys, tiny-keccak, tiny-keccak
1717
GPL-3.0 (10): keccak-hash, bitcrypto, chain, keys, primitives, rpc, script, serialization, serialization_derive, unexpected
1818
ISC (2): rdrand, untrusted
19-
MIT (117): asynchronous-codec, atomicdex-gossipsub, atty, base58, bech32, bitcoin-cash, bitcoin-cash-base, bitcoin-cash-script-macro, bitcoin-cash-slp, bitvec, blake2b_simd, build_const, byte-slice-cast, bytes, bytes, bytes, crossterm, crossterm_winapi, crunchy, crunchy, cuckoofilter, cuckoofilter, data-encoding, derive_more, enum-primitive-derive, ethbloom, ethereum-types, ethereum-types-serialize, fixed-hash, fomat-macros, fomat-macros, funty, futures_codec, generic-array, generic-array, gstuff, h2, hostname, http-body, http-body, hyper, jsonrpc-core, libp2p, libp2p-core, libp2p-dns, libp2p-floodsub, libp2p-floodsub, libp2p-mplex, libp2p-noise, libp2p-ping, libp2p-plaintext, libp2p-request-response, libp2p-swarm, libp2p-swarm-derive, libp2p-tcp, libp2p-wasm-ext, libp2p-websocket, libp2p-yamux, libsqlite3-sys, lru, lru, matches, memoffset, metrics, metrics-core, metrics-observer-prometheus, metrics-runtime, metrics-util, miniz_oxide, miniz_oxide, mio, mocktopus, mocktopus_macros, multiaddr, multihash, multihash-derive, multistream-select, ordered-float, owning_ref, parity-util-mem-derive, quanta, radium, redox_syscall, redox_users, rmp, rmp-serde, rusqlite, rust-ini, rw-stream-sink, serde-value, serde_bencode, slab, slab, spin, sql-builder, synstructure, tap, tokio, tokio-buf, tokio-macros, tokio-util, toolchain_find, tower-service, tracing, tracing-core, try-lock, typemap, unsafe-any, unsigned-varint, unsigned-varint, void, want, wasm-timer, web3, which, winreg, wyz
19+
MIT (117): asynchronous-codec, atomicdex-gossipsub, atty, base58, bech32, bitcoin-cash, bitcoin-cash-base, bitcoin-cash-script-macro, bitcoin-cash-slp, bitvec, blake2b_simd, build_const, byte-slice-cast, bytes, bytes, bytes, crossterm, crossterm_winapi, crunchy, crunchy, cuckoofilter, cuckoofilter, data-encoding, derive_more, enum-primitive-derive, ethbloom, ethereum-types, ethereum-types-serialize, fixed-hash, fomat-macros, fomat-macros, funty, futures_codec, generic-array, generic-array, gstuff, h2, hostname, http-body, http-body, hyper, jsonrpc-core, libp2p, libp2p-core, libp2p-dns, libp2p-floodsub, libp2p-floodsub, libp2p-mplex, libp2p-noise, libp2p-ping, libp2p-plaintext, libp2p-request-response, libp2p-swarm, libp2p-swarm-derive, libp2p-tcp, libp2p-wasm-ext, libp2p-websocket, libp2p-yamux, libsqlite3-sys, lru, lru, matches, memoffset, metrics, metrics-core, metrics-observer-prometheus, metrics-runtime, metrics-util, miniz_oxide, miniz_oxide, mio, mocktopus, mocktopus_macros, multiaddr, multihash, multihash-derive, multistream-select, ordered-float, owning_ref, quanta, radium, redox_syscall, redox_users, rmp, rmp-serde, rusqlite, rust-ini, rw-stream-sink, serde-value, serde_bencode, slab, slab, spin, sql-builder, synstructure, tap, tokio, tokio-buf, tokio-macros, tokio-util, toolchain_find, tower-service, tracing, tracing-core, try-lock, typemap, unsafe-any, unsigned-varint, unsigned-varint, void, want, wasm-timer, web3, which, winreg, wyz
2020
MIT OR Unlicense (9): aho-corasick, byteorder, byteorder, memchr, quickcheck, same-file, termcolor, walkdir, winapi-util
2121
MPL-2.0 (3): webpki-roots, webpki-roots, wepoll-sys-stjepang
2222
MPL-2.0+ (3): bitmaps, im, sized-chunks

mm2src/mm2_main/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ mm2_rpc = { path = "../mm2_rpc", features = ["rpc_facilities"] }
7676
mm2_state_machine = { path = "../mm2_state_machine" }
7777
trading_api = { path = "../trading_api" }
7878
num-traits.workspace = true
79-
parity-util-mem.workspace = true
8079
parking_lot = { workspace = true, features = ["nightly"] }
8180
primitives = { path = "../mm2_bitcoin/primitives" }
8281
primitive-types.workspace = true

mm2src/mm2_main/src/lp_ordermatch.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2543,17 +2543,8 @@ fn order_pair_root_mut<'a>(state: &'a mut HashMap<AlbOrderedOrderbookPair, H64>,
25432543
}
25442544
}
25452545

2546-
/// `parity_util_mem::malloc_size` crushes for some reason on wasm32
2547-
#[cfg(target_arch = "wasm32")]
2548-
fn collect_orderbook_metrics(_ctx: &MmArc, _orderbook: &Orderbook) {}
2549-
2550-
#[cfg(not(target_arch = "wasm32"))]
25512546
fn collect_orderbook_metrics(ctx: &MmArc, orderbook: &Orderbook) {
2552-
use parity_util_mem::malloc_size;
2553-
2554-
let memory_db_size = malloc_size(&orderbook.memory_db);
25552547
mm_gauge!(ctx.metrics, "orderbook.len", orderbook.order_set.len() as f64);
2556-
mm_gauge!(ctx.metrics, "orderbook.memory_db", memory_db_size as f64);
25572548
}
25582549

25592550
struct Orderbook {

0 commit comments

Comments
 (0)