mirror of
https://github.com/Magnus167/msyrs.git
synced 2025-08-20 13:00:01 +00:00
download IS slower than Go-lang
This commit is contained in:
parent
28cda5aae5
commit
8ef47925d3
@ -83,11 +83,17 @@ impl JPMaQSDownload {
|
||||
assert!(all_jpmaq_expressions(expressions.clone()));
|
||||
let dqts_vec = self.get_expressions(expressions)?;
|
||||
|
||||
println!("Retrieved {} time series", dqts_vec.len());
|
||||
let start = std::time::Instant::now();
|
||||
let indicators = dqts_vec
|
||||
.iter()
|
||||
.flat_map(|dqts| dqts.get_timeseries_by_ticker())
|
||||
.map(|tsv| JPMaQSIndicator::new(tsv))
|
||||
.collect::<Result<Vec<JPMaQSIndicator>, Box<dyn Error>>>()?;
|
||||
println!(
|
||||
"Converted time series to indicators in {:?}",
|
||||
start.elapsed()
|
||||
);
|
||||
|
||||
Ok(indicators)
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ fn main() {
|
||||
start.elapsed()
|
||||
);
|
||||
|
||||
let num_ticks = 200;
|
||||
let num_ticks = 1000;
|
||||
let sel_tickers: Vec<String> = tickers
|
||||
.iter()
|
||||
.take(num_ticks)
|
||||
|
Loading…
x
Reference in New Issue
Block a user