Skip to content

Instantly share code, notes, and snippets.

@spmallette
Created November 30, 2020 13:48
Show Gist options
  • Select an option

  • Save spmallette/596a72eda47c9a6171bbecbb4a06d6c6 to your computer and use it in GitHub Desktop.

Select an option

Save spmallette/596a72eda47c9a6171bbecbb4a06d6c6 to your computer and use it in GitHub Desktop.
gremlin> [1,10,50,100,500,1000,5000,10000].collect {
......1> def binding = [a: RandomStringUtils.random(30), b: rand.nextDouble(), c: rand.nextInt(), d: rand.nextInt()]
......2> def longScript = (0..<it).collect{engine.createTemplate(baseScript).make(binding)}.join()
......3> def start = System.nanoTime()
......4> GremlinASTChecker.parse(longScript).getTimeout().get()
......5> [it, TimeUnit.MILLISECONDS.convert(System.nanoTime() - start, TimeUnit.NANOSECONDS)]
......6> }
==>[1,1]
==>[10,1]
==>[50,4]
==>[100,9]
==>[500,37]
==>[1000,78]
==>[5000,386]
==>[10000,796]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment