Can getLatency() be made available on mutation response "Assigned" class?

Moved from GitHub dgraph-js/26

Posted by jeffkhull:

getLatency() is very helpful for query operations. However, to measure performance, and separate network latency from database latency, we need to have the getLatency() function on mutation responses as well as query responses.

Can getLatency() be made available on the Assigned class as well?

gpahal commented :

This client library uses grpc to communicate with the Dgraph server. But the Dgraph server doesn’t expose latency metrics for a mutation. So this is not possible until Dgraph server supports this.

gpahal commented :

You can create an issue on the main dgraph repo regarding this.

jeffkhull commented :

@gpahal , FYI, pawan just merged this into master.

gpahal commented :

Support added in master with commit Add latency to Assigned in proto and generated files · dgraph-io/dgraph-js@eef5bbd · GitHub

jeffkhull commented :

@gpahal thanks, can I get this with some tag on NPM?

gpahal commented :

I’ve published v1.1.2-beta.1 with the next tag. So, npm install dgraph-js@next --save should work.

jeffkhull commented :

@gpahal Thanks - I will plan to test as soon as I can get the latest dgraph master on dockerhub. Closing for now.

pawanrawal commented :

The latest image has been pushed to docker hub. Give it a try now @tamethecomplex.

jeffkhull commented :

@pawanrawal Looks good to me, thanks!