17
17
* limitations under the License.
18
18
*/
19
19
20
+ using System ;
20
21
using System . Collections . Generic ;
21
22
using Droog . Beanstalk . Client . Protocol ;
23
+ using Droog . Beanstalk . Client . Util ;
22
24
23
25
namespace Droog . Beanstalk . Client {
24
26
public class ServerStats : StatsBase {
25
27
26
- public ServerStats ( IDictionary < string , string > dictionary )
27
- : base ( dictionary ) {
28
- }
28
+ public ServerStats ( IDictionary < string , string > dictionary ) : base ( dictionary ) { }
29
+
30
+ public uint CurrentUrgentJobs { get { return this [ "current-jobs-urgent" ] . As < uint > ( ) ; } }
31
+ public uint CurrentReadyJobs { get { return this [ "current-jobs-ready" ] . As < uint > ( ) ; } }
32
+ public uint CurrentReservedJobs { get { return this [ "current-jobs-reserved" ] . As < uint > ( ) ; } }
33
+ public uint CurrentDelayedJobs { get { return this [ "current-jobs-delayed" ] . As < uint > ( ) ; } }
34
+ public uint CurrentBuriedJobs { get { return this [ "current-jobs-buried" ] . As < uint > ( ) ; } }
35
+ public uint PutCommandCount { get { return this [ "cmd-put" ] . As < uint > ( ) ; } }
36
+ public uint PeekCommandCount { get { return this [ "cmd-peek" ] . As < uint > ( ) ; } }
37
+ public uint PeekReadyCommandCount { get { return this [ "cmd-peek-ready" ] . As < uint > ( ) ; } }
38
+ public uint PeekDelayedCommandCount { get { return this [ "cmd-peek-delayed" ] . As < uint > ( ) ; } }
39
+ public uint ReserveCommandCount { get { return this [ "cmd-reserve" ] . As < uint > ( ) ; } }
40
+ public uint UseCommandCount { get { return this [ "cmd-use" ] . As < uint > ( ) ; } }
41
+ public uint WatchCommandCount { get { return this [ "cmd-watch" ] . As < uint > ( ) ; } }
42
+ public uint IgnoreCommandCount { get { return this [ "cmd-ignore" ] . As < uint > ( ) ; } }
43
+ public uint DeleteCommandCount { get { return this [ "cmd-delete" ] . As < uint > ( ) ; } }
44
+ public uint ReleaseCommandCount { get { return this [ "cmd-release" ] . As < uint > ( ) ; } }
45
+ public uint BuryCommandCount { get { return this [ "cmd-bury" ] . As < uint > ( ) ; } }
46
+ public uint KickCommandCount { get { return this [ "cmd-kick" ] . As < uint > ( ) ; } }
47
+ public uint ServerStatsCommandCount { get { return this [ "cmd-stats" ] . As < uint > ( ) ; } }
48
+ public uint JobStatsCommandCount { get { return this [ "cmd-stats-job" ] . As < uint > ( ) ; } }
49
+ public uint TubeStatsCommandCount { get { return this [ "cmd-stats-tube" ] . As < uint > ( ) ; } }
50
+ public uint ListTubesCommandCount { get { return this [ "cmd-list-tubes" ] . As < uint > ( ) ; } }
51
+ public uint ListUsedTubesCommandCount { get { return this [ "cmd-list-tube-used" ] . As < uint > ( ) ; } }
52
+ public uint ListWatchedTubesCommandCount { get { return this [ "cmd-list-tubes-watched" ] . As < uint > ( ) ; } }
53
+ public uint JobTimeouts { get { return this [ "job-timeouts" ] . As < uint > ( ) ; } }
54
+ public uint TotalJobs { get { return this [ "total-jobs" ] . As < uint > ( ) ; } }
55
+ public uint MaxJobSize { get { return this [ "max-job-size" ] . As < uint > ( ) ; } }
56
+ public uint CurrentTubeCount { get { return this [ "current-tubes" ] . As < uint > ( ) ; } }
57
+ public uint CurrentConnectionCount { get { return this [ "current-connections" ] . As < uint > ( ) ; } }
58
+ public uint CurrentProducerCount { get { return this [ "current-producers" ] . As < uint > ( ) ; } }
59
+ public uint CurrentWorkerCount { get { return this [ "current-workers" ] . As < uint > ( ) ; } }
60
+ public uint CurrentWaitingClientCount { get { return this [ "current-waiting" ] . As < uint > ( ) ; } }
61
+ public uint TotalConnections { get { return this [ "total-connections" ] . As < uint > ( ) ; } }
62
+ public uint Pid { get { return this [ "pid" ] . As < uint > ( ) ; } }
63
+ public string Version { get { return this [ "version" ] ; } }
64
+ public TimeSpan UserUsagetime { get { return TimeSpan . FromSeconds ( this [ "rusage-utime" ] . As < uint > ( ) ) ; } }
65
+ public TimeSpan SystemUsagetime { get { return TimeSpan . FromSeconds ( this [ "rusage-stime" ] . As < uint > ( ) ) ; } }
66
+ public TimeSpan Uptime { get { return TimeSpan . FromSeconds ( this [ "uptime" ] . As < uint > ( ) ) ; } }
67
+ public uint BinlogOldestIndex { get { return this [ "binlog-oldest-index" ] . As < uint > ( ) ; ; } }
68
+ public uint BinlogCurrentIndex { get { return this [ "binlog-current-index" ] . As < uint > ( ) ; ; } }
69
+ public uint BinlogMaxSize { get { return this [ "binlog-max-size" ] . As < uint > ( ) ; } }
29
70
}
30
71
}
0 commit comments