forked from dgraph-io/badger
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix ever existing iterator and transaction in write benchmark (dgraph…
…-io#1457) 91a80ef (Add support collecting stats (sst count, vlog count, file sizes, move key count, valid keys etc) introduced count of various types of keys in the report (log) of the benchmark write tool. For counting various keys, iterators were used in the function `reportStats()` and the keys were counted periodically. For closing the iterators `defer it.close()` was used, which never closed iterators until `reportStats()` returned. This caused the iterators to accumulate and hence resulting in excessive memory usage. Now, this key count is made optional by the introduction of a new option `--show-keys`, which is disabled by default. The statistics is collected in a separate function and the iterators are properly closed after each iteration cycle. Also the transaction is properly discarded after each run.
- Loading branch information
1 parent
763e7d7
commit d31355d
Showing
1 changed file
with
44 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters