Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
R
rust-rocksdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangzongwu
rust-rocksdb
Commits
129f6c7d
Commit
129f6c7d
authored
Sep 26, 2017
by
Huachao Huang
Committed by
GitHub
Sep 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `read_amp_bytes_per_bit` test (#140)
parent
1742f182
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
test_rocksdb_options.rs
tests/test_rocksdb_options.rs
+5
-2
No files found.
tests/test_rocksdb_options.rs
View file @
129f6c7d
...
...
@@ -573,12 +573,15 @@ fn test_block_based_options() {
opts
.enable_statistics
();
opts
.set_stats_dump_period_sec
(
60
);
let
mut
bopts
=
BlockBasedOptions
::
new
();
bopts
.set_read_amp_bytes_per_bit
(
16
);
bopts
.set_read_amp_bytes_per_bit
(
4
);
let
mut
cfopts
=
ColumnFamilyOptions
::
new
();
cfopts
.set_block_based_table_factory
(
&
bopts
);
let
db
=
DB
::
open_cf
(
opts
.clone
(),
path_str
,
vec!
[
"default"
],
vec!
[
cfopts
])
.unwrap
();
db
.put
(
b
"a"
,
b
"a"
)
.unwrap
();
// RocksDB use randomness for the read amplification statistics,
// we should use a bigger enough value (> `bytes_per_bit`) to make
// sure the statistics will not be 0.
db
.put
(
b
"a"
,
b
"abcdef"
)
.unwrap
();
db
.flush
(
true
)
.unwrap
();
db
.get
(
b
"a"
)
.unwrap
();
assert_ne!
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment