code: function measure(measureName, startMarkName, endMarkName) {
              if (enabled) {
                  var end = endMarkName && marks[endMarkName] || ts.timestamp();
                  var start = startMarkName && marks[startMarkName] || profilerStart;
                  measures[measureName] = (measures[measureName] || 0) + (end - start);
              }
          }
docs: Adds a performance measurement with the specified name.
  
  @param measureName The name of the performance measurement.
  @param startMarkName The name of the starting mark. If not supplied, the point at which the
  profiler was enabled is used.
  @param endMarkName The name of the ending mark. If not supplied, the current timestamp is
  used.