File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,7 @@ import * as KEYS from '../commands/KEYS';
84
84
import * as LASTSAVE from '../commands/LASTSAVE' ;
85
85
import * as LATENCY_DOCTOR from '../commands/LATENCY_DOCTOR' ;
86
86
import * as LATENCY_GRAPH from '../commands/LATENCY_GRAPH' ;
87
+ import * as LATENCY_LATEST from '../commands/LATENCY_LATEST' ;
87
88
import * as LOLWUT from '../commands/LOLWUT' ;
88
89
import * as MEMORY_DOCTOR from '../commands/MEMORY_DOCTOR' ;
89
90
import * as MEMORY_MALLOC_STATS from '../commands/MEMORY_MALLOC-STATS' ;
@@ -290,6 +291,8 @@ export default {
290
291
latencyDoctor : LATENCY_DOCTOR ,
291
292
LATENCY_GRAPH ,
292
293
latencyGraph : LATENCY_GRAPH ,
294
+ LATENCY_LATEST ,
295
+ latencyLatest : LATENCY_LATEST ,
293
296
LOLWUT ,
294
297
lolwut : LOLWUT ,
295
298
MEMORY_DOCTOR ,
Original file line number Diff line number Diff line change
1
+ import { strict as assert } from 'assert' ;
2
+ import testUtils , { GLOBAL } from '../test-utils' ;
3
+ import { transformArguments } from './LATENCY_LATEST' ;
4
+
5
+ describe ( 'LATENCY LATEST' , ( ) => {
6
+ it ( 'transformArguments' , ( ) => {
7
+ assert . deepEqual (
8
+ transformArguments ( ) ,
9
+ [ 'LATENCY' , 'LATEST' ]
10
+ ) ;
11
+ } ) ;
12
+
13
+ testUtils . testWithClient ( 'client.latencyLatest' , async client => {
14
+ const latency = await client . latencyLatest ( ) ;
15
+ const latencyType = Array . isArray ( latency ) ;
16
+ assert . strictEqual ( latencyType , true ) ;
17
+ } , GLOBAL . SERVERS . OPEN ) ;
18
+ } ) ;
Original file line number Diff line number Diff line change
1
+ import { RedisCommandArguments } from '.' ;
2
+
3
+ export interface latenctStats {
4
+ event : string ,
5
+ timestamp : number ,
6
+ latestLatency : number ,
7
+ allTimeLatency : number
8
+ }
9
+
10
+ export function transformArguments ( ) : RedisCommandArguments {
11
+ return [ 'LATENCY' , 'LATEST' ] ;
12
+ }
13
+
14
+ export declare function transformReply ( ) : Array < latenctStats > ;
You can’t perform that action at this time.
0 commit comments