mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-30 01:09:26 -07:00
benches: added
This commit is contained in:
24
Cargo.lock
generated
24
Cargo.lock
generated
@@ -228,9 +228,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "axum"
|
name = "axum"
|
||||||
version = "0.8.7"
|
version = "0.8.8"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5b098575ebe77cb6d14fc7f32749631a6e44edbef6b796f89b020e99ba20d425"
|
checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"axum-core",
|
"axum-core",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -2974,9 +2974,9 @@ checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lsm-tree"
|
name = "lsm-tree"
|
||||||
version = "3.0.0-rc.6"
|
version = "3.0.0-rc.7"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "315d36f307af4d53f1030d6561de3fb6b914d5c242c353be101ddff91527c4b4"
|
checksum = "58db607ef63b47ede3640944f69e0872bc169e938253bcaa8dcf32631638ceab"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder-lite",
|
"byteorder-lite",
|
||||||
"byteview",
|
"byteview",
|
||||||
@@ -4037,9 +4037,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portable-atomic"
|
name = "portable-atomic"
|
||||||
version = "1.11.1"
|
version = "1.12.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
checksum = "f59e70c4aef1e55797c2e8fd94a4f2a973fc972cfde0e0b05f683667b0cd39dd"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "portable-atomic-util"
|
name = "portable-atomic-util"
|
||||||
@@ -4208,9 +4208,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rapidhash"
|
name = "rapidhash"
|
||||||
version = "4.1.1"
|
version = "4.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d8e65c75143ce5d47c55b510297eeb1182f3c739b6043c537670e9fc18612dae"
|
checksum = "2988730ee014541157f48ce4dcc603940e00915edc3c7f9a8d78092256bb2493"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustversion",
|
"rustversion",
|
||||||
]
|
]
|
||||||
@@ -4468,9 +4468,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ryu"
|
name = "ryu"
|
||||||
version = "1.0.20"
|
version = "1.0.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
checksum = "62049b2877bf12821e8f9ad256ee38fdc31db7387ec2d3b3f403024de2034aea"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "same-file"
|
name = "same-file"
|
||||||
@@ -6005,9 +6005,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "zip"
|
name = "zip"
|
||||||
version = "6.0.0"
|
version = "7.0.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b"
|
checksum = "bdd8a47718a4ee5fe78e07667cd36f3de80e7c2bfe727c7074245ffc7303c037"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arbitrary",
|
"arbitrary",
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ debug = true
|
|||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
aide = { version = "0.16.0-alpha.1", features = ["axum-json", "axum-query"] }
|
aide = { version = "0.16.0-alpha.1", features = ["axum-json", "axum-query"] }
|
||||||
axum = "0.8.7"
|
axum = "0.8.8"
|
||||||
bitcoin = { version = "0.32.8", features = ["serde"] }
|
bitcoin = { version = "0.32.8", features = ["serde"] }
|
||||||
bitcoincore-rpc = "0.19.0"
|
bitcoincore-rpc = "0.19.0"
|
||||||
brk_bencher = { version = "0.1.0-alpha.0", path = "crates/brk_bencher" }
|
brk_bencher = { version = "0.1.0-alpha.0", path = "crates/brk_bencher" }
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ serde = { workspace = true }
|
|||||||
tokio = { workspace = true }
|
tokio = { workspace = true }
|
||||||
toml = "0.9.10"
|
toml = "0.9.10"
|
||||||
vecdb = { workspace = true }
|
vecdb = { workspace = true }
|
||||||
zip = { version = "6.0.0", default-features = false, features = ["deflate"] }
|
zip = { version = "7.0.0", default-features = false, features = ["deflate"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "brk"
|
name = "brk"
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ use brk_types::{
|
|||||||
use log::error;
|
use log::error;
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use rustc_hash::{FxHashMap, FxHashSet};
|
use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
use vecdb::{AnyVec, GenericStoredVec, TypedVecIterator};
|
use vecdb::{AnyVec, GenericStoredVec, TypedVecIterator, likely};
|
||||||
|
|
||||||
use crate::{Indexes, Readers, Stores, Vecs, constants::*};
|
use crate::{Indexes, Readers, Stores, Vecs, constants::*};
|
||||||
|
|
||||||
@@ -628,7 +628,7 @@ impl<'a> BlockProcessor<'a> {
|
|||||||
|
|
||||||
/// Check for TXID collisions (only for known duplicate TXIDs).
|
/// Check for TXID collisions (only for known duplicate TXIDs).
|
||||||
pub fn check_txid_collisions(&self, txs: &[ComputedTx]) -> Result<()> {
|
pub fn check_txid_collisions(&self, txs: &[ComputedTx]) -> Result<()> {
|
||||||
if !self.check_collisions {
|
if likely(!self.check_collisions) {
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -122,6 +122,7 @@ impl Vecs {
|
|||||||
|
|
||||||
pub fn flush(&mut self, height: Height) -> Result<()> {
|
pub fn flush(&mut self, height: Height) -> Result<()> {
|
||||||
self.iter_mut_any_stored_vec()
|
self.iter_mut_any_stored_vec()
|
||||||
|
// self.par_iter_mut_any_stored_vec()
|
||||||
.par_bridge()
|
.par_bridge()
|
||||||
.try_for_each(|vec| vec.stamped_write(Stamp::from(height)))?;
|
.try_for_each(|vec| vec.stamped_write(Stamp::from(height)))?;
|
||||||
self.db.flush()?;
|
self.db.flush()?;
|
||||||
@@ -161,6 +162,16 @@ impl Vecs {
|
|||||||
.chain(self.output.iter_mut_any())
|
.chain(self.output.iter_mut_any())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// fn par_iter_mut_any_stored_vec(&mut self) -> impl Iterator<Item = &mut dyn AnyStoredVec> {
|
||||||
|
// self.block
|
||||||
|
// .iter_mut_any()
|
||||||
|
// .chain(self.tx.iter_mut_any())
|
||||||
|
// .chain(self.txin.iter_mut_any())
|
||||||
|
// .chain(self.txout.iter_mut_any())
|
||||||
|
// .chain(self.address.iter_mut_any())
|
||||||
|
// .chain(self.output.iter_mut_any())
|
||||||
|
// }
|
||||||
|
|
||||||
pub fn db(&self) -> &Database {
|
pub fn db(&self) -> &Database {
|
||||||
&self.db
|
&self.db
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ derive_deref = { workspace = true }
|
|||||||
itoa = "1.0.15"
|
itoa = "1.0.15"
|
||||||
jiff = { workspace = true }
|
jiff = { workspace = true }
|
||||||
num_enum = "0.7.5"
|
num_enum = "0.7.5"
|
||||||
rapidhash = "4.1.1"
|
rapidhash = "4.2.0"
|
||||||
ryu = "1.0.20"
|
ryu = "1.0.21"
|
||||||
schemars = { workspace = true }
|
schemars = { workspace = true }
|
||||||
serde = { workspace = true }
|
serde = { workspace = true }
|
||||||
serde_json = { workspace = true }
|
serde_json = { workspace = true }
|
||||||
|
|||||||
Reference in New Issue
Block a user