Handbook
Glossary
(insert-batch) ( quot: ( i -- doc ) collection -- )
Vocabulary
mongodb
.
benchmark
Inputs
quot
a
quotation
with stack effect
( i -- doc )
collection
an
object
Outputs
None
Definition
USING:
accessors
kernel
math
mongodb.driver
namespaces
;
IN:
mongodb.benchmark
:
(insert-batch)
( quot: ( i -- doc ) collection -- )
[
trial-size
batch-size
[
/
]
keep
]
2dip
[
]
curry
[
[
(prepare-batch)
]
2curry
]
dip
[
dip
result
get
lasterror>>
[
save
]
[
save-unsafe
]
if
]
curry
compose
each-integer
;