We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9529a99 commit 5cd581bCopy full SHA for 5cd581b
main.go
@@ -70,6 +70,7 @@ var (
70
maxBytesPerTask int
71
debug bool
72
workers int
73
+ enableConcurrency bool
74
diskThroughput int
75
streamLoadThroughput int
76
checkUTF8 bool
@@ -245,6 +246,9 @@ func paramCheck() {
245
246
continue
247
}
248
kv := strings.Split(v, ":")
249
+ if strings.ToLower(kv[0]) == "format" && strings.ToLower(kv[1]) == "csv" {
250
+ enableConcurrency = true
251
+ }
252
if len(kv) > 2 {
253
headers[kv[0]] = strings.Join(kv[1:], ":")
254
} else {
@@ -294,6 +298,11 @@ func calculateAndCheckWorkers(reader *file.FileReader, size int64) {
294
298
return
295
299
296
300
301
+ if !enableConcurrency {
302
+ loadInfo.Workers = 1
303
+ return
304
305
+
297
306
ratio := float64(size) / float64(maxBytesPerTask)
307
tmpWorkers := 0
308
0 commit comments