forked from andrewfromcali/mcinsight
/
MemcacheSnapshot.h
35 lines (30 loc) · 1.02 KB
/
MemcacheSnapshot.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// MemcacheSnapshot.h
// mcinsight
//
// Created by Gerard Gualberto on 6/28/09.
// Copyright 2009 Tierra Innovation. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface MemcacheSnapshot : NSObject {
NSMutableArray *entries;
NSInteger totalKeys;
NSInteger cacheHits;
NSInteger cacheMisses;
NSString *hitRatio;
NSInteger totalKeySize;
NSInteger totalValueSize;
}
@property (nonatomic, readonly) NSInteger totalKeys;
@property (nonatomic, readonly) NSInteger totalKeySize;
@property (nonatomic, readonly) NSInteger totalValueSize;
@property (nonatomic, readonly) NSInteger cacheHits;
@property (nonatomic, readonly) NSInteger cacheMisses;
@property (nonatomic, readonly) NSString *hitRatio;
@property (assign) NSMutableArray *entries;
-(NSDictionary*)getEntryAt: (NSInteger)index;
-(NSString*)formatExpiresAt: (NSInteger)expiresAt insertedAt:(NSInteger)insertedAt;
-(void)filterBy: (NSString *)filter;
-(NSString *)stringFromFileSize: (NSInteger)theSize;
-(NSString *)stringFromSeconds: (NSInteger)totalSeconds;
@end