1

How do you show the query execution time for a gremlin query while running it a console such as Datastax Studio?

I tried

clockWithResult(100) { myquery }

But I get an error saying "cannot convert from int to Supplier"

Robert Corvus
  • 2,054
  • 23
  • 30

1 Answers1

0

I'm pretty sure that clockWithResult() is a function provided only by Gremlin Console and is not part of the Gremlin language itself. Other Gremlin tools (like DS Studio) don't have that specific feature that I'm aware of. If you really want to use that feature you should connect Gremlin Console to DataStax Graph and execute your query from there.

That said, clockWithResult() is just a member of TimeUtil which can be found here. You could either:

  1. Try to modify the DS Graph sandbox whitelist to allow that class to be used and then use it through Studio OR
  2. If that approach doesn't work for some reason, just copy/paste that function code to a Studio cell and use it directly (I'm mostly sure that would work, but haven't tried).
stephen mallette
  • 45,298
  • 5
  • 67
  • 135