Skip to content

Commit 74505ac

Browse files
committed
Expose durationMicros when dumping hearbeatSucceeded events
1 parent bef382c commit 74505ac

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/MongoDB/Monitoring/ServerHeartbeatSucceededEvent.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ static HashTable* php_phongo_serverheartbeatsucceededevent_get_debug_info(phongo
124124
ADD_ASSOC_STRING(&retval, "host", intern->host.host);
125125
ADD_ASSOC_LONG_EX(&retval, "port", intern->host.port);
126126
ADD_ASSOC_BOOL_EX(&retval, "awaited", intern->awaited);
127+
ADD_ASSOC_INT64(&retval, "durationMicros", intern->duration_micros);
127128

128129
if (!php_phongo_bson_to_zval_ex(intern->reply, &reply_state)) {
129130
zval_ptr_dtor(&reply_state.zchild);

tests/apm/serverHeartbeatSucceededEvent-001.phpt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ object(MongoDB\Driver\Monitoring\ServerHeartbeatSucceededEvent)#%d (%d) {
6868
int(%d)
6969
["awaited"]=>
7070
bool(%s)
71+
["durationMicros"]=>
72+
int(%d)
7173
["reply"]=>
7274
object(stdClass)#%d (%d) {%A
7375
}

0 commit comments

Comments
 (0)