Skip to content

Commit

Permalink
More obvious statement seq realization
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvinqian00 committed Aug 28, 2024
1 parent 4ed754b commit d58cc58
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/bench/lrsql/bench.clj
Original file line number Diff line number Diff line change
Expand Up @@ -328,16 +328,16 @@
(System/exit 0))
;; Store statements
(when insert-input
(let [_ (log/info "Starting statement generation...")
inputs (read-insert-input insert-input)
statements (generate-statements inputs insert-size statement-ref-type)
_ (count statements) ; realize statements
_ (log/info "Statement generation finished.")
_ (log/info "Starting statement insertion...")
results (if async?
(store-statements-async! statements opts)
(store-statements-sync! statements opts))
_ (log/info "Statement insertion finished.")]
(let [_ (log/info "Starting statement generation...")
inputs (read-insert-input insert-input)
stmts* (generate-statements inputs insert-size statement-ref-type)
stmts (into [] stmts*) ; realize statements
_ (log/info "Statement generation finished.")
_ (log/info "Starting statement insertion...")
results (if async?
(store-statements-async! stmts opts)
(store-statements-sync! stmts opts))
_ (log/info "Statement insertion finished.")]
(printf "\n%s Insert benchmark results for n = %d (in ms) %s\n"
"**********"
(quot insert-size batch-size)
Expand Down

0 comments on commit d58cc58

Please sign in to comment.