Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3507543
D4583.id14693.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D4583.id14693.diff
View Options
diff --git a/services/commtest/tests/blob_performance_test.rs b/services/commtest/tests/blob_performance_test.rs
--- a/services/commtest/tests/blob_performance_test.rs
+++ b/services/commtest/tests/blob_performance_test.rs
@@ -4,6 +4,8 @@
mod tools;
#[path = "./blob/put.rs"]
mod put;
+#[path = "./blob/get.rs"]
+mod get;
use std::env;
use bytesize::ByteSize;
@@ -62,6 +64,28 @@
// GET
rt.block_on(async {
println!("performing GET operations");
+ let mut handlers = vec![];
+
+ for (i, item) in blob_data.iter().enumerate() {
+ let item_cloned = item.clone();
+ let mut client_cloned = client.clone();
+ handlers.push(tokio::spawn(async move {
+ let received_sizes =
+ get::run(&mut client_cloned, &item_cloned).await.unwrap();
+ let expected_data_size =
+ item_cloned.chunks_sizes.iter().sum::<usize>();
+ let received_data_size = received_sizes.iter().sum::<usize>();
+ assert_eq!(
+ expected_data_size, received_data_size,
+ "invalid size of data for index {}, expected {}, got {}",
+ i, expected_data_size, received_data_size
+ );
+ }));
+ }
+
+ for handler in handlers {
+ handler.await.unwrap();
+ }
});
// REMOVE
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 9:09 PM (20 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689114
Default Alt Text
D4583.id14693.diff (1 KB)
Attached To
Mode
D4583: [services] Tests - Add GET for Blob performance tests
Attached
Detach File
Event Timeline
Log In to Comment