Allows a specific cache to fill cache statistics during an Update
More...
#include <userver/cache/cache_statistics.hpp>
|
void | Finish (std::size_t total_documents_count) |
| Mark that the Update has finished with changes.
|
|
void | FinishNoChanges () |
| Mark that the Update has finished without changes.
|
|
void | FinishWithError () |
| Mark that the Update failed.
|
|
void | IncreaseDocumentsReadCount (std::size_t add) |
| Each item received from the data source should be accounted with this function.
|
|
void | IncreaseDocumentsParseFailures (std::size_t add) |
| Each received item that failed validation should be accounted with this function, in addition to IncreaseDocumentsReadCount.
|
|
Allows a specific cache to fill cache statistics during an Update
Unless Finish or FinishNoChanges is called, the update is considered to be a failure.
- Examples
- samples/http_caching/http_caching.cpp.
Definition at line 53 of file cache_statistics.hpp.
◆ Finish()
void cache::UpdateStatisticsScope::Finish |
( |
std::size_t |
total_documents_count | ) |
|
◆ IncreaseDocumentsParseFailures()
void cache::UpdateStatisticsScope::IncreaseDocumentsParseFailures |
( |
std::size_t |
add | ) |
|
Each received item that failed validation should be accounted with this function, in addition to IncreaseDocumentsReadCount.
- Note
- This method can be called multiple times per
Update
- Parameters
-
add | the number of non-valid items newly received |
◆ IncreaseDocumentsReadCount()
void cache::UpdateStatisticsScope::IncreaseDocumentsReadCount |
( |
std::size_t |
add | ) |
|
Each item received from the data source should be accounted with this function.
- Note
- This method can be called multiple times per
Update
- Parameters
-
add | the number of items (both valid and non-valid) newly received |
- Examples
- samples/http_caching/http_caching.cpp.
The documentation for this class was generated from the following file: