Skip to content

Commit

Permalink
importer: increase default batch, job_count, worker_count. (#3)
Browse files Browse the repository at this point in the history
* importer: increase default batch,  job_count, worker_count.
  • Loading branch information
holys authored and IANTHEREAL committed Jun 29, 2017
1 parent b34a9fe commit 47b7826
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions importer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ func NewConfig() *Config {
fs.StringVar(&cfg.TableSQL, "t", "", "create table sql")
fs.StringVar(&cfg.IndexSQL, "i", "", "create index sql")

fs.IntVar(&cfg.WorkerCount, "c", 1, "parallel worker count")
fs.IntVar(&cfg.JobCount, "n", 1, "total job count")
fs.IntVar(&cfg.Batch, "b", 1, "insert batch commit count")
fs.IntVar(&cfg.WorkerCount, "c", 2, "parallel worker count")
fs.IntVar(&cfg.JobCount, "n", 10000, "total job count")
fs.IntVar(&cfg.Batch, "b", 1000, "insert batch commit count")

fs.StringVar(&cfg.DBCfg.Host, "h", "127.0.0.1", "set the database host ip")
fs.StringVar(&cfg.DBCfg.User, "u", "root", "set the database user")
Expand Down
7 changes: 4 additions & 3 deletions importer/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ index-sql = "create unique index u_b on t(b);"

log-level = "info"

worker-count = 1
job-count = 10
batch = 1
worker-count = 2
job-count = 10000
# batch insert rows
batch = 1000

[db]
host = "127.0.0.1"
Expand Down

0 comments on commit 47b7826

Please sign in to comment.