Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3507423
D4634.id15044.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
D4634.id15044.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D4634: [services] Tests - Backup - Add attachments for logs
Attached
Detach File
Event Timeline
Log In to Comment