Search in sources :

Example 1 with Profiler

use of org.exist.xquery.Profiler in project exist by eXist-db.

the class Profile method eval.

public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
    final Profiler profiler = context.getProfiler();
    if (isCalledAs("enable-profiling")) {
        final int verbosity = ((IntegerValue) args[0].itemAt(0)).getInt();
        profiler.setEnabled(true);
        profiler.setVerbosity(verbosity);
    } else {
        profiler.setEnabled(false);
    }
    return Sequence.EMPTY_SEQUENCE;
}
Also used : Profiler(org.exist.xquery.Profiler) IntegerValue(org.exist.xquery.value.IntegerValue)

Aggregations

Profiler (org.exist.xquery.Profiler)1 IntegerValue (org.exist.xquery.value.IntegerValue)1