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
aa576395
Commit
aa576395
authored
Jan 05, 2018
by
zhangjinpeng1987
Committed by
siddontang
Jan 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add output level for compaction job (#182)
parent
dab0fc9d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
0 deletions
+14
-0
c.cc
librocksdb_sys/crocksdb/c.cc
+5
-0
c.h
librocksdb_sys/crocksdb/crocksdb/c.h
+3
-0
lib.rs
librocksdb_sys/src/lib.rs
+1
-0
event_listener.rs
src/event_listener.rs
+4
-0
test_event_listener.rs
tests/test_event_listener.rs
+1
-0
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
aa576395
...
...
@@ -1707,6 +1707,11 @@ uint64_t crocksdb_compactionjobinfo_num_corrupt_keys(
return
info
->
rep
.
stats
.
num_corrupt_keys
;
}
int
crocksdb_compactionjobinfo_output_level
(
const
crocksdb_compactionjobinfo_t
*
info
)
{
return
info
->
rep
.
output_level
;
}
/* ExternalFileIngestionInfo */
const
char
*
crocksdb_externalfileingestioninfo_cf_name
(
...
...
librocksdb_sys/crocksdb/crocksdb/c.h
View file @
aa576395
...
...
@@ -641,6 +641,9 @@ crocksdb_compactionjobinfo_elapsed_micros(const crocksdb_compactionjobinfo_t*);
extern
C_ROCKSDB_LIBRARY_API
uint64_t
crocksdb_compactionjobinfo_num_corrupt_keys
(
const
crocksdb_compactionjobinfo_t
*
);
extern
C_ROCKSDB_LIBRARY_API
int
crocksdb_compactionjobinfo_output_level
(
const
crocksdb_compactionjobinfo_t
*
);
/* External file ingestion info */
...
...
librocksdb_sys/src/lib.rs
View file @
aa576395
...
...
@@ -1461,6 +1461,7 @@ extern "C" {
pub
fn
crocksdb_compactionjobinfo_num_corrupt_keys
(
info
:
*
const
DBCompactionJobInfo
,
)
->
uint64_t
;
pub
fn
crocksdb_compactionjobinfo_output_level
(
info
:
*
const
DBCompactionJobInfo
)
->
c_int
;
pub
fn
crocksdb_externalfileingestioninfo_cf_name
(
info
:
*
const
DBIngestionInfo
,
...
...
src/event_listener.rs
View file @
aa576395
...
...
@@ -88,6 +88,10 @@ impl CompactionJobInfo {
pub
fn
num_corrupt_keys
(
&
self
)
->
u64
{
unsafe
{
crocksdb_ffi
::
crocksdb_compactionjobinfo_num_corrupt_keys
(
&
self
.
0
)
}
}
pub
fn
output_level
(
&
self
)
->
i32
{
unsafe
{
crocksdb_ffi
::
crocksdb_compactionjobinfo_output_level
(
&
self
.
0
)
}
}
}
pub
struct
IngestionInfo
(
DBIngestionInfo
);
...
...
tests/test_event_listener.rs
View file @
aa576395
...
...
@@ -62,6 +62,7 @@ impl EventListener for EventCounter {
assert_ne!
(
info
.elapsed_micros
(),
0
);
assert_eq!
(
info
.num_corrupt_keys
(),
0
);
assert
!
(
info
.output_level
()
>=
0
);
self
.compaction
.fetch_add
(
1
,
Ordering
::
SeqCst
);
}
...
...
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