Difference between revisions of "Ns cache stats"
Jump to navigation
Jump to search
(New page: '''NAME''' : '''ns_cache_stats''' − Returns statistics for a cache '''SYNOPSIS''' : '''ns_cache_stats''' ''cachename ?arrayName?'' '''DESCRIPTION''' : If arrayName is ommitted, returns...) |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
'''NAME''' | '''NAME''' | ||
− | : '''ns_cache_stats''' − Returns statistics for a cache | + | : '''ns_cache_stats''' − Returns statistics (since creation) for a cache |
'''SYNOPSIS''' | '''SYNOPSIS''' | ||
Line 9: | Line 9: | ||
:: entries: %d flushed: %d hits: %d misses: %d hitrate: %d | :: entries: %d flushed: %d hits: %d misses: %d hitrate: %d | ||
: If arrayName is provided, this command sets the above keys in the specified array and returns nothing. | : If arrayName is provided, this command sets the above keys in the specified array and returns nothing. | ||
+ | |||
+ | : The data elements are: | ||
+ | :* '''entries''' is the total number of entries currently in the cache (including expired and in-progress ones) | ||
+ | :* '''flushed''' is the total number of successful flushes (i.e. when the key was found) | ||
+ | :* '''hits''' is the total number of times a key was found to exist whenever the key was accessed whether it was being read or set | ||
+ | :* '''misses''' is the total number of times a key was not found whenever it was accessed whether it was being read or set | ||
+ | :* '''hitrate''' is the percent value of hits to hits+misses | ||
+ | |||
+ | : Note that because of how it is implemented, a single [[ns_cache]] eval operation when a key does not exist will result in both a miss and a hit. | ||
'''SEE ALSO''' | '''SEE ALSO''' |
Latest revision as of 02:20, 27 October 2009
NAME
- ns_cache_stats − Returns statistics (since creation) for a cache
SYNOPSIS
- ns_cache_stats cachename ?arrayName?
DESCRIPTION
- If arrayName is ommitted, returns a string of the following format:
- entries: %d flushed: %d hits: %d misses: %d hitrate: %d
- If arrayName is provided, this command sets the above keys in the specified array and returns nothing.
- The data elements are:
- entries is the total number of entries currently in the cache (including expired and in-progress ones)
- flushed is the total number of successful flushes (i.e. when the key was found)
- hits is the total number of times a key was found to exist whenever the key was accessed whether it was being read or set
- misses is the total number of times a key was not found whenever it was accessed whether it was being read or set
- hitrate is the percent value of hits to hits+misses
- Note that because of how it is implemented, a single ns_cache eval operation when a key does not exist will result in both a miss and a hit.
SEE ALSO