private String generateScript(final Integer id, final boolean binding) {
        if (binding && id != null) throw new IllegalArgumentException("If binding is true then the id should be null");

        final StringBuilder b = new StringBuilder();
        b.append("g.with('evaluationTimeout', 1000L).addV('person').property(id,");

        if (!binding) b.append("'");
        b.append(null == id ? "x" : id);
        if (!binding) b.append("'");
        b.append(").");

        IntStream.range(0, 256).forEach(i -> b.append("addV('person').property(id,").append(i).append(")."));

        b.deleteCharAt(b.length() - 1);

        return b.toString();
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-tools/gremlin-benchmark/src/main/java/org/apache/tinkerpop/jsr223/GremlinGroovyScriptEngineBenchmark.java