Page MenuHomePhabricator

D4634.id15044.diff
No OneTemporary

D4634.id15044.diff

diff --git a/services/commtest/tests/backup_performance_test.rs b/services/commtest/tests/backup_performance_test.rs
--- a/services/commtest/tests/backup_performance_test.rs
+++ b/services/commtest/tests/backup_performance_test.rs
@@ -108,7 +108,7 @@
rt.block_on(async {
println!("performing ADD ATTACHMENTS - BACKUPS operations");
let mut handlers = vec![];
- for item in backup_data {
+ for item in &backup_data {
let item_cloned = item.clone();
let mut client_cloned = client.clone();
handlers.push(tokio::spawn(async move {
@@ -174,7 +174,38 @@
}
}
- // ADD ATTACHMENTS
+ // ADD ATTACHMENTS - LOGS
+ rt.block_on(async {
+ println!("performing ADD ATTACHMENTS - LOGS operations");
+ let mut handlers = vec![];
+ for backup_item in &backup_data {
+ let backup_item_cloned = backup_item.clone();
+ for log_index in 0..backup_item_cloned.log_items.len() {
+ let backup_item_recloned = backup_item_cloned.clone();
+ let mut client_cloned = client.clone();
+ handlers.push(tokio::spawn(async move {
+ if !backup_item_recloned
+ .backup_item
+ .attachments_holders
+ .is_empty()
+ {
+ add_attachments::run(
+ &mut client_cloned,
+ &backup_item_recloned,
+ Some(log_index),
+ )
+ .await
+ .unwrap();
+ }
+ }));
+ }
+ }
+
+ for handler in handlers {
+ handler.await.unwrap();
+ }
+ });
+
// PULL BACKUP
})
.await

File Metadata

Mime Type
text/plain
Expires
Sat, Dec 21, 8:46 PM (20 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2689025
Default Alt Text
D4634.id15044.diff (1 KB)

Event Timeline