Skip to content
Myr

Make it possible to export to multiple files at once

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Steve Pentland · committed by David Peter · parent a91912f · Browse files · 1 file+7 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−3 removed

  • other:+7 added−3 removed

1 file+7 added−3 removed

modified:src/main.rs+7 added-3 removed
141 unmodified lines
142 .arg(143 Arg::with_name("export-csv")144 .long("export-csv")145 .takes_value(true)146 .multiple(true)147 .number_of_values(1)148 .value_name("FILE")149 .help("Export the timing results to the given file in csv format."),150 )151 .help_message("Print this help message.")
27 unmodified lines
179180 // Initial impl since we're only doing csv files, expand once we have multiple181 // export types. Simplest probably to do the same for each, but check for182 // None manager on later additions (JSON, Markdown, etc.)181 let mut export_manager = match matches.value_of("export-csv") {182 Some(filename) => {183 let mut export_manager = match matches.values_of("export-csv") {184 Some(filenames) => {185 let mut export_manager = create_export_manager();186 for filename in filenames {184 export_manager.add_exporter(&ResultExportType::Csv(filename.to_string()));187 export_manager.add_exporter(&ResultExportType::Csv(filename.to_string()));188 }189 Some(export_manager)190 }191 None => None,192 };
25 unmodified lines