File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ func TestDefaultClient(t *testing.T) {
4646 assert .Zero (t , res .Stats .WriteOps , "should not have written any bytes" )
4747 assert .Zero (t , res .Stats .StorageBytesRead , "should not have read from storage" )
4848 assert .Zero (t , res .Stats .StorageBytesWrite , "should not have written to storage" )
49+ assert .Nil (t , res .Stats .ProcessingTimeMs , "should not have processing time ms" )
4950 })
5051 })
5152
Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ type Stats struct {
2424 // StorageBytesWrite is the amount of data written to storage, in bytes.
2525 StorageBytesWrite int `json:"storage_bytes_write"`
2626
27+ // ProcessingTimeMs is the amount of time producing the event, only applies to events.
28+ ProcessingTimeMs * int `json:"processing_time_ms,omitempty"`
29+
2730 // Attempts is the number of times the client attempted to run the query.
2831 Attempts int `json:"_"`
2932}
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ func TestStreaming(t *testing.T) {
4040 err = events .Next (& event )
4141 require .NoError (t , err )
4242 require .Equal (t , fauna .StatusEvent , event .Type )
43+ require .NotNil (t , event .Stats .ProcessingTimeMs )
4344 })
4445
4546 t .Run ("Fails on non-streamable values" , func (t * testing.T ) {
You can’t perform that action at this time.
0 commit comments