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;
}
Aggregations