Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WIP Add cache statistics #812

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
mykhailo-kuchma wants to merge 1 commit into master
base: master
Choose a base branch
Loading
from add_cache_statistics
Open

Conversation

@mykhailo-kuchma
Copy link
Contributor

@mykhailo-kuchma mykhailo-kuchma commented Apr 28, 2020

Signed-off-by: Mykhailo Kuchma ext-mykhailo.kuchma@here.com

Signed-off-by: Mykhailo Kuchma <ext-mykhailo.kuchma@here.com>
Comment on lines +141 to +146
/**
* @brief Retrieve the accumulated statistics of the cache instance.
*
* @return Statistics structure.
*/
virtual Statistics GetStatistics() const { return Statistics{}; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add to DefaultCache only!

Copy link

codecov bot commented Apr 28, 2020

Codecov Report

Merging #812 into master will decrease coverage by 0.0%.
The diff coverage is 46.2%.

Impacted file tree graph

@@ Coverage Diff @@
## master #812 +/- ##
========================================
- Coverage 78.7% 78.7% -0.0% 
========================================
 Files 292 292 
 Lines 9928 9941 +13 
========================================
+ Hits 7817 7823 +6 
- Misses 2111 2118 +7 
Impacted Files Coverage Δ
...cpp-sdk-core/include/olp/core/cache/DefaultCache.h 100.0% <ø> (ø)
...pp-sdk-core/include/olp/core/cache/KeyValueCache.h 66.7% <0.0%> (-33.3%) ⬇️
olp-cpp-sdk-core/src/cache/DefaultCache.cpp 88.9% <0.0%> (-11.1%) ⬇️
olp-cpp-sdk-core/src/cache/DefaultCacheImpl.h 100.0% <ø> (ø)
olp-cpp-sdk-core/src/cache/DefaultCacheImpl.cpp 93.8% <60.0%> (-1.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 307391d...14c61e9. Read the comment docs.

* @brief The accumulated statistics for the cache.
*/
struct Statistics {
/// The number of bytes written to disk cache with Put methods.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The number of bytes written to disk cache with Put methods.
/// The number of bytes written to the disk cache with the `Put` methods.

struct Statistics {
/// The number of bytes written to disk cache with Put methods.
uint64_t bytes_written;
/// The number of bytes read from disk cache with Get methods.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The number of bytes read from disk cache with Get methods.
/// The number of bytes read from the disk cache with the `Get` methods.

uint64_t bytes_written;
/// The number of bytes read from disk cache with Get methods.
uint64_t bytes_read;
/// The number of bytes removed from disk cache with Remove method.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The number of bytes removed from disk cache with Remove method.
/// The number of bytes removed from the disk cache with the `Remove` methods.

uint64_t bytes_read;
/// The number of bytes removed from disk cache with Remove method.
uint64_t bytes_removed;
/// The number of bytes evicted from disk cache.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The number of bytes evicted from disk cache.
/// The number of bytes evicted from the disk cache.

uint64_t bytes_removed;
/// The number of bytes evicted from disk cache.
uint64_t bytes_evicted;
/// The size of content stored in mutable disk cache.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// The size of content stored in mutable disk cache.
/// The size of content stored in the mutable disk cache.

virtual bool RemoveKeysWithPrefix(const std::string& prefix) = 0;

/**
* @brief Retrieve the accumulated statistics of the cache instance.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @brief Retrieve the accumulated statistics of the cache instance.
* @brief Gets the accumulated statistics of the cache instance.

/**
* @brief Retrieve the accumulated statistics of the cache instance.
*
* @return Statistics structure.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @return Statistics structure.
* @return Thestatistics structure.

*/
bool RemoveKeysWithPrefix(const std::string& prefix) override;

/// Implements GetStatistics method of KeyValueCache.
Copy link
Contributor

@HalynaDumych HalynaDumych Aug 19, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
/// Implements GetStatistics method of KeyValueCache.
/// Implements the `GetStatistics` method of `KeyValueCache`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

2 more reviewers

@andescu andescu andescu requested changes

@HalynaDumych HalynaDumych HalynaDumych requested changes

Reviewers whose approvals may not affect merge requirements

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /