increase batch insert size to 1000 for klines

Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
c9s 2022-06-19 17:41:52 +08:00
parent bf0186cf55
commit 6e562e2ede
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 4 additions and 3 deletions

View File

@ -29,9 +29,10 @@ riskControls:
backtest:
startTime: "2020-09-04"
endTime: "2020-09-14"
sessions:
- binance
symbols:
- BTCUSDT
- ETHUSDT
- LINKUSDT
account:
binance:
balances:

View File

@ -52,7 +52,7 @@ func (s *BacktestService) SyncKLineByInterval(ctx context.Context, exchange type
q := &batch.KLineBatchQuery{Exchange: exchange}
return q.Query(ctx, symbol, interval, startTime, endTime)
},
BatchInsertBuffer: 500,
BatchInsertBuffer: 1000,
BatchInsert: func(obj interface{}) error {
kLines := obj.([]types.KLine)
return s.BatchInsert(kLines)