Difference between revisions of "Ns cache stats"

From AOLserver Wiki
Jump to navigation Jump to search
 
Line 11: Line 11:
  
 
: The data elements are:
 
: The data elements are:
:* entries is the total number of entries currently in the cache (including expired and in-progress ones)
+
:* '''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)
+
:* '''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
+
:* '''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
+
:* '''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
+
:* '''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.
 
: 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.

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

ns_cache

Category Documentation - Category Core Tcl API