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
2088c8d4
Unverified
Commit
2088c8d4
authored
Feb 13, 2019
by
dorianzheng
Committed by
GitHub
Feb 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shared_ptr misuse (#271)
parent
dc16c9b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
c.cc
librocksdb_sys/crocksdb/c.cc
+12
-12
No files found.
librocksdb_sys/crocksdb/c.cc
View file @
2088c8d4
...
@@ -2258,8 +2258,8 @@ void crocksdb_options_enable_statistics(crocksdb_options_t* opt, unsigned char v
...
@@ -2258,8 +2258,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
();
}
}
}
}
...
@@ -2684,8 +2684,8 @@ void crocksdb_options_set_delayed_write_rate(crocksdb_options_t *opt, uint64_t d
...
@@ -2684,8 +2684,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
;
...
@@ -2693,8 +2693,8 @@ char *crocksdb_options_statistics_get_string(crocksdb_options_t *opt) {
...
@@ -2693,8 +2693,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
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
return
statistics
->
getTickerCount
(
ticker_type
);
return
statistics
->
getTickerCount
(
ticker_type
);
}
}
return
0
;
return
0
;
...
@@ -2702,8 +2702,8 @@ uint64_t crocksdb_options_statistics_get_ticker_count(crocksdb_options_t* opt,
...
@@ -2702,8 +2702,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
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
return
statistics
->
getAndResetTickerCount
(
ticker_type
);
return
statistics
->
getAndResetTickerCount
(
ticker_type
);
}
}
return
0
;
return
0
;
...
@@ -2711,8 +2711,8 @@ uint64_t crocksdb_options_statistics_get_and_reset_ticker_count(crocksdb_options
...
@@ -2711,8 +2711,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
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
return
strdup
(
statistics
->
getHistogramString
(
type
).
c_str
());
return
strdup
(
statistics
->
getHistogramString
(
type
).
c_str
());
}
}
return
nullptr
;
return
nullptr
;
...
@@ -2727,8 +2727,8 @@ unsigned char crocksdb_options_statistics_get_histogram(
...
@@ -2727,8 +2727,8 @@ unsigned char crocksdb_options_statistics_get_histogram(
double
*
average
,
double
*
average
,
double
*
standard_deviation
,
double
*
standard_deviation
,
double
*
max
)
{
double
*
max
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
if
(
opt
->
rep
.
statistics
)
{
if
(
statistics
)
{
rocksdb
::
Statistics
*
statistics
=
opt
->
rep
.
statistics
.
get
();
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