11use crate :: command:: add:: LoadTestAdd ;
22use crate :: command:: command_user_id_file_name:: LoadTestDumpLogUserIdFileName ;
33use crate :: command:: dump_log:: { DumpLog , LoadTestDumpLogFileName } ;
4+ use crate :: command:: load_test_file:: LoadTestFileCommand ;
45use crate :: command:: user_id:: LoadTestUserIdCommand ;
56use crate :: command:: user_id_stock_symbol:: LoadTestUserIdStockSymbolCommand ;
67use crate :: command:: user_id_stock_symbol_amount_created:: LoadTestUserIdStockSymbolAmountCommand ;
@@ -12,6 +13,7 @@ use tracing::debug;
1213pub mod add;
1314pub mod command_user_id_file_name;
1415pub mod dump_log;
16+ pub mod load_test_file;
1517pub mod user_id;
1618pub mod user_id_stock_symbol;
1719pub mod user_id_stock_symbol_amount_created;
@@ -54,6 +56,8 @@ pub enum LoadTestCommand {
5456 DumpLogUser ( LoadTestDumpLogUserIdFileName ) ,
5557 /// Get the information about the user's current state
5658 GetUserInfo ( LoadTestUserIdCommand ) ,
59+ /// Get a log file from the server
60+ File ( LoadTestFileCommand ) ,
5761}
5862
5963impl LoadTestCommand {
@@ -113,6 +117,7 @@ impl LoadTestCommand {
113117 LoadTestCommand :: GetUserInfo ( LoadTestUserIdCommand { user_id, .. } ) => {
114118 Some ( user_id. clone ( ) )
115119 }
120+ LoadTestCommand :: File ( _) => None ,
116121 }
117122 }
118123
@@ -208,6 +213,11 @@ impl LoadTestCommand {
208213 . get_user_info ( get_user_info)
209214 . await
210215 . map ( |resp| debug ! ( "{resp:?}" ) ) ,
216+ LoadTestCommand :: File ( file) => client
217+ . day_trader
218+ . file ( file)
219+ . await
220+ . map ( |resp| debug ! ( "{resp:?}" ) ) ,
211221 }
212222 }
213223}
0 commit comments