Class getScriptClass(final String script) throws Exception {
        try {
            return classMap.get(script).get();
        } catch (ExecutionException e) {
            final Throwable t = e.getCause();

            // more often than not the cause is a compilation problem but there might be other failures that can
            // occur in which case, just throw the ExecutionException as-is and let it bubble up as i'm not sure
            // what the specific handling should be
            if (t instanceof CompilationFailedException)
                throw (CompilationFailedException) t;
            else
                throw e;
        } catch (InterruptedException e) {
            //This should never happen as the future should completed before it is returned to the us.
            throw new AssertionError();
        }
    }
Gets the total number of nanoseconds that the cache spent compiling scripts.
gremlin-groovy/src/main/java/org/apache/tinkerpop/gremlin/groovy/jsr223/GremlinGroovyScriptEngine.java