Skip to content

Commit cc9915a

Browse files
committed
DROPME try
1 parent 48a42f1 commit cc9915a

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

.github/workflows/vss-integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
cd ldk-node
7676
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
7777
RUSTFLAGS="--cfg vss_test" cargo build --verbose --color always
78-
RUSTFLAGS="--cfg vss_test" cargo test --test integration_tests_vss
78+
RUSTFLAGS="--cfg vss_test --cfg tokio_unstable" cargo test --test integration_tests_vss -- --nocapture
7979
8080
- name: Cleanup
8181
run: |

src/io/vss_store.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ impl KVStore for VssStore {
136136
store_id: self.store_id.clone(),
137137
key: self.build_key(primary_namespace, secondary_namespace, key)?,
138138
};
139+
140+
println!("READ: {}/{}/{}", primary_namespace, secondary_namespace, key);
139141
let resp = self.runtime.block_on(self.client.get_object(&request)).map_err(|e| {
140142
let msg = format!(
141143
"Failed to read from key {}/{}/{}: {}",
@@ -146,6 +148,7 @@ impl KVStore for VssStore {
146148
_ => Error::new(ErrorKind::Other, msg),
147149
}
148150
})?;
151+
println!("READ DONE: {}/{}/{}", primary_namespace, secondary_namespace, key);
149152
// unwrap safety: resp.value must be always present for a non-erroneous VSS response, otherwise
150153
// it is an API-violation which is converted to [`VssError::InternalServerError`] in [`VssClient`]
151154
let storable = Storable::decode(&resp.value.unwrap().value[..]).map_err(|e| {
@@ -176,13 +179,15 @@ impl KVStore for VssStore {
176179
delete_items: vec![],
177180
};
178181

182+
println!("WRITE: {}/{}/{}", primary_namespace, secondary_namespace, key);
179183
self.runtime.block_on(self.client.put_object(&request)).map_err(|e| {
180184
let msg = format!(
181185
"Failed to write to key {}/{}/{}: {}",
182186
primary_namespace, secondary_namespace, key, e
183187
);
184188
Error::new(ErrorKind::Other, msg)
185189
})?;
190+
println!("WRITE DONE: {}/{}/{}", primary_namespace, secondary_namespace, key);
186191

187192
Ok(())
188193
}
@@ -200,19 +205,22 @@ impl KVStore for VssStore {
200205
}),
201206
};
202207

208+
println!("REMOVE: {}/{}/{}", primary_namespace, secondary_namespace, key);
203209
self.runtime.block_on(self.client.delete_object(&request)).map_err(|e| {
204210
let msg = format!(
205211
"Failed to delete key {}/{}/{}: {}",
206212
primary_namespace, secondary_namespace, key, e
207213
);
208214
Error::new(ErrorKind::Other, msg)
209215
})?;
216+
println!("REMOVE DONE: {}/{}/{}", primary_namespace, secondary_namespace, key);
210217
Ok(())
211218
}
212219

213220
fn list(&self, primary_namespace: &str, secondary_namespace: &str) -> io::Result<Vec<String>> {
214221
check_namespace_key_validity(primary_namespace, secondary_namespace, None, "list")?;
215222

223+
println!("LIST: {}/{}", primary_namespace, secondary_namespace);
216224
let keys = self
217225
.runtime
218226
.block_on(self.list_all_keys(primary_namespace, secondary_namespace))
@@ -223,6 +231,7 @@ impl KVStore for VssStore {
223231
);
224232
Error::new(ErrorKind::Other, msg)
225233
})?;
234+
println!("LIST DONE: {}/{}", primary_namespace, secondary_namespace);
226235

227236
Ok(keys)
228237
}

src/runtime.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,15 @@ impl Runtime {
5555
// to detect the outer context here, and otherwise use whatever was set during
5656
// initialization.
5757
let handle = tokio::runtime::Handle::try_current().unwrap_or(self.handle());
58+
#[cfg(tokio_unstable)]
59+
{
60+
println!("Tokio blocking queue depth: {}", handle.metrics().blocking_queue_depth());
61+
println!(
62+
"Tokio num_blocking_threads {} / idle_blocking_threads {}",
63+
handle.metrics().num_blocking_threads(),
64+
handle.metrics().num_idle_blocking_threads()
65+
);
66+
}
5867
tokio::task::block_in_place(move || handle.block_on(future))
5968
}
6069

0 commit comments

Comments
 (0)