code: public final void setInstructionObserverThreshold(int threshold)
      {
          if (sealed) onSealedMutation();
          if (threshold < 0) throw new IllegalArgumentException();
          instructionThreshold = threshold;
          setGenerateObserverCount(threshold > 0);
      }
docs: Set threshold of executed instructions counter that triggers call to
  <code>observeInstructionCount()</code>.
  When the threshold is zero, instruction counting is disabled,
  otherwise each time the run-time executes at least the threshold value
  of script instructions, <code>observeInstructionCount()</code> will
  be called.<br>
  Note that the meaning of "instruction" is not guaranteed to be
  consistent between compiled and interpretive modes: executing a given
  script or function in the different modes will result in different
  instruction counts against the threshold.
  {@link #setGenerateObserverCount} is called with true if
  <code>threshold</code> is greater than zero, false otherwise.
  @param threshold The instruction threshold