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
5db6e4cc
Unverified
Commit
5db6e4cc
authored
Feb 14, 2019
by
dorianzheng
Committed by
GitHub
Feb 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shared_ptr misuse (#271) (#273)
(cherry picked from commit
2088c8d4
)
parent
d65ca9df
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
c.cc
librocksdb_sys/crocksdb/c.cc
+8
-8
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
5db6e4cc
...
@@ -2133,8 +2133,8 @@ void crocksdb_options_enable_statistics(crocksdb_options_t* opt, unsigned char v
...
@@ -2133,8 +2133,8 @@ void crocksdb_options_enable_statistics(crocksdb_options_t* opt, unsigned char v
}
}
void
crocksdb_options_reset_statistics
(
crocksdb_options_t
*
opt
)
{
void
crocksdb_options_reset_statistics
(
crocksdb_options_t
*
opt
)
{
auto
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
auto
*
statistics
=
opt
->
rep
.
statistics
.
get
();
statistics
->
Reset
();
statistics
->
Reset
();
}
}
}
}
...
@@ -2559,8 +2559,8 @@ void crocksdb_options_set_delayed_write_rate(crocksdb_options_t *opt, uint64_t d
...
@@ -2559,8 +2559,8 @@ void crocksdb_options_set_delayed_write_rate(crocksdb_options_t *opt, uint64_t d
}
}
char
*
crocksdb_options_statistics_get_string
(
crocksdb_options_t
*
opt
)
{
char
*
crocksdb_options_statistics_get_string
(
crocksdb_options_t
*
opt
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
return
strdup
(
statistics
->
ToString
().
c_str
());
return
strdup
(
statistics
->
ToString
().
c_str
());
}
}
return
nullptr
;
return
nullptr
;
...
@@ -2568,8 +2568,8 @@ char *crocksdb_options_statistics_get_string(crocksdb_options_t *opt) {
...
@@ -2568,8 +2568,8 @@ char *crocksdb_options_statistics_get_string(crocksdb_options_t *opt) {
uint64_t
crocksdb_options_statistics_get_ticker_count
(
crocksdb_options_t
*
opt
,
uint64_t
crocksdb_options_statistics_get_ticker_count
(
crocksdb_options_t
*
opt
,
uint32_t
ticker_type
)
{
uint32_t
ticker_type
)
{
if
(
opt
->
rep
.
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
statistics
)
{
return
statistics
->
getTickerCount
(
ticker_type
);
return
statistics
->
getTickerCount
(
ticker_type
);
}
}
return
0
;
return
0
;
...
@@ -2577,8 +2577,8 @@ uint64_t crocksdb_options_statistics_get_ticker_count(crocksdb_options_t* opt,
...
@@ -2577,8 +2577,8 @@ uint64_t crocksdb_options_statistics_get_ticker_count(crocksdb_options_t* opt,
uint64_t
crocksdb_options_statistics_get_and_reset_ticker_count
(
crocksdb_options_t
*
opt
,
uint64_t
crocksdb_options_statistics_get_and_reset_ticker_count
(
crocksdb_options_t
*
opt
,
uint32_t
ticker_type
)
{
uint32_t
ticker_type
)
{
if
(
opt
->
rep
.
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
statistics
)
{
return
statistics
->
getAndResetTickerCount
(
ticker_type
);
return
statistics
->
getAndResetTickerCount
(
ticker_type
);
}
}
return
0
;
return
0
;
...
@@ -2586,8 +2586,8 @@ uint64_t crocksdb_options_statistics_get_and_reset_ticker_count(crocksdb_options
...
@@ -2586,8 +2586,8 @@ uint64_t crocksdb_options_statistics_get_and_reset_ticker_count(crocksdb_options
char
*
crocksdb_options_statistics_get_histogram_string
(
crocksdb_options_t
*
opt
,
char
*
crocksdb_options_statistics_get_histogram_string
(
crocksdb_options_t
*
opt
,
uint32_t
type
)
{
uint32_t
type
)
{
if
(
opt
->
rep
.
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
statistics
)
{
return
strdup
(
statistics
->
getHistogramString
(
type
).
c_str
());
return
strdup
(
statistics
->
getHistogramString
(
type
).
c_str
());
}
}
return
nullptr
;
return
nullptr
;
...
@@ -2602,8 +2602,8 @@ unsigned char crocksdb_options_statistics_get_histogram(
...
@@ -2602,8 +2602,8 @@ unsigned char crocksdb_options_statistics_get_histogram(
double
*
average
,
double
*
average
,
double
*
standard_deviation
,
double
*
standard_deviation
,
double
*
max
)
{
double
*
max
)
{
if
(
opt
->
rep
.
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
statistics
)
{
crocksdb_histogramdata_t
data
;
crocksdb_histogramdata_t
data
;
statistics
->
histogramData
(
type
,
&
data
.
rep
);
statistics
->
histogramData
(
type
,
&
data
.
rep
);
*
median
=
data
.
rep
.
median
;
*
median
=
data
.
rep
.
median
;
...
...
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