C# Class Ivony.Caching.CachePerformaceMonitor

CacheService 性能计数监视器
Inheritance: ICacheMonitor
Mostrar archivo Open project: Ivony/Ivony.Caching

Public Methods

Method Description
CachePerformaceMonitor ( bool startImmediate = true ) : System

创建 CacheServicePerformaceMonitor 实例

HitRate ( string cacheKey = null ) : double

获取指定缓存键的命中率

Hits ( string cacheKey = null ) : long

获取指定缓存键的命中数量

ICacheMonitor ( string cacheKey ) : void
Misses ( string cacheKey = null ) : long

获取指定缓存键的未命中数量

Start ( ) : void

启动性能计数

Stop ( ) : void

暂停性能计数

Private Methods

Method Description
StatisticPerformace ( ) : void
StatisticPerformaceLoop ( ) : System.Threading.Tasks.Task

Method Details

CachePerformaceMonitor() public method

创建 CacheServicePerformaceMonitor 实例
public CachePerformaceMonitor ( bool startImmediate = true ) : System
startImmediate bool 是否立即启动性能计数
return System

HitRate() public method

获取指定缓存键的命中率
public HitRate ( string cacheKey = null ) : double
cacheKey string 缓存键,若不指定则获取全局数据
return double

Hits() public method

获取指定缓存键的命中数量
public Hits ( string cacheKey = null ) : long
cacheKey string 缓存键,若不指定则获取全局数据
return long

ICacheMonitor() public method

public ICacheMonitor ( string cacheKey ) : void
cacheKey string
return void

Misses() public method

获取指定缓存键的未命中数量
public Misses ( string cacheKey = null ) : long
cacheKey string 缓存键,若不指定则获取全局数据
return long

Start() public method

启动性能计数
public Start ( ) : void
return void

Stop() public method

暂停性能计数
public Stop ( ) : void
return void