File tree 2 files changed +6
-5
lines changed
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ function anger (opts) {
64
64
const mapObj = map . get ( uidOf ( payload ) )
65
65
totalResponses ++
66
66
67
+ const startTime = mapObj . start
68
+ const end = process . hrtime ( startTime )
69
+ const responseTime = end [ 0 ] * 1e3 + end [ 1 ] / 1e6
70
+ latencies . record ( responseTime )
71
+
67
72
if ( ! -- mapObj . expectedResponses ) {
68
73
tracker . emit ( 'publish-events-recieved' , uidOf ( payload ) )
69
74
@@ -73,11 +78,6 @@ function anger (opts) {
73
78
74
79
return next ( mapObj . sender )
75
80
}
76
-
77
- const startTime = mapObj . start
78
- const end = process . hrtime ( startTime )
79
- const responseTime = end [ 0 ] * 1e3 + end [ 1 ] / 1e6
80
- latencies . record ( responseTime )
81
81
}
82
82
83
83
function next ( sender ) {
Original file line number Diff line number Diff line change @@ -25,4 +25,5 @@ const instance = anger({
25
25
26
26
instance . on ( 'end' , ( result ) => {
27
27
// do things with result! yay!
28
+ console . log ( result )
28
29
} )
You can’t perform that action at this time.
0 commit comments