Used for performance testing purposes only.
426573
private void putLocalObject(final UploadObjectRequest reqIn,
            OutputStream os) throws IOException {
        UploadObjectRequest req = reqIn.clone();

        final File fileOrig = req.getFile();
        final InputStream isOrig = req.getInputStream();

        if (isOrig == null) {
            if (fileOrig == null)
                throw new IllegalArgumentException("Either a file lor input stream must be specified");
            req.setInputStream(new FileInputStream(fileOrig));
            req.setFile(null);
        }

        try {
            IOUtils.copy(req.getInputStream(), os);
        } finally {
            cleanupDataSource(req, fileOrig, isOrig,
                    req.getInputStream(), log);
            IOUtils.closeQuietly(os, log);
        }
        return;
    }
647205
def cal_model_performance(obsl, siml):
    """"""
    nse = MathClass.nashcoef(obsl, siml)
    r2 = MathClass.rsquare(obsl, siml)
    rmse = MathClass.rmse(obsl, siml)
    pbias = MathClass.pbias(obsl, siml)
    rsr = MathClass.rsr(obsl, siml)
    print('NSE: %.2f, R-square: %.2f, PBIAS: %.2f%%, RMSE: %.2f, RSR: %.2f' %
          (nse, r2, pbias, rmse, rsr))
1300720
@Override
    protected void doPerform() {
        WebElement source = isSourceDocumentRoot() ? null : getFirstElement();
        if (offset != null) {
            Point offsetPoint = offset.offset(getSize());
            getActions().moveToElement(source, offsetPoint.x(), offsetPoint.y()).perform();
        } else {
            getActions().moveToElement(source).perform();
        }
    }
182390
function only(testName, callback) {
  	if (focused$1) {
  		return;
  	}

  	config.queue.length = 0;
  	focused$1 = true;

  	var newTest = new Test({
  		testName: testName,
  		callback: callback
  	});

  	newTest.queue();
  }
999180
public function main(): void
    {
        $args = getopt('t::');

        if (isset($args['t']) === false) {
            $this->showBasicExample();
            $this->showIncludedObjectsExample();
            $this->showSparseAndFieldSetsExample();
            $this->showTopLevelMetaAndLinksExample();
            $this->dynamicSchemaExample();
        } else {
            $num = $args['t'];
            $inv = empty($num) === true || is_numeric($num) === false || ctype_digit($num) == false || (int)$num <= 0;
            $num = $inv === true ? 1000 : (int)$num;

            $this->runPerformanceTestForSmallNestedResources($num);
            $this->runPerformanceTestForBigCollection($num);
        }
    }
53751
@Benchmark
    @OperationsPerInvocation(20)
    public void benchmarkJavassist(Blackhole blackHole) {
        blackHole.consume(javassistInstance.method(booleanValue));
        blackHole.consume(javassistInstance.method(byteValue));
        blackHole.consume(javassistInstance.method(shortValue));
        blackHole.consume(javassistInstance.method(intValue));
        blackHole.consume(javassistInstance.method(charValue));
        blackHole.consume(javassistInstance.method(intValue));
        blackHole.consume(javassistInstance.method(longValue));
        blackHole.consume(javassistInstance.method(floatValue));
        blackHole.consume(javassistInstance.method(doubleValue));
        blackHole.consume(javassistInstance.method(stringValue));
        blackHole.consume(javassistInstance.method(booleanValue, booleanValue, booleanValue));
        blackHole.consume(javassistInstance.method(byteValue, byteValue, byteValue));
        blackHole.consume(javassistInstance.method(shortValue, shortValue, shortValue));
        blackHole.consume(javassistInstance.method(intValue, intValue, intValue));
        blackHole.consume(javassistInstance.method(charValue, charValue, charValue));
        blackHole.consume(javassistInstance.method(intValue, intValue, intValue));
        blackHole.consume(javassistInstance.method(longValue, longValue, longValue));
        blackHole.consume(javassistInstance.method(floatValue, floatValue, floatValue));
        blackHole.consume(javassistInstance.method(doubleValue, doubleValue, doubleValue));
        blackHole.consume(javassistInstance.method(stringValue, stringValue, stringValue));
    }
1143624
def _perform_write(self, addr, data):
        """"""
        return self._machine_controller.write(addr, data, self._x, self._y, 0)
263481
function runBenchmark(benchmark, environments) {
  let benchmarkName;
  const benches = environments.map(environment => {
    const module = require(path.join(environment.distPath, benchmark))
    benchmarkName = module.name;
    return new Benchmark(environment.revision, module.measure);
  });

  console.log('⏱️   ' + benchmarkName);
  for (let i = 0; i < benches.length; ++i) {
    benches[i].run({ async: false });
    process.stdout.write('  ' + cyan(i + 1) + ' tests completed.\u000D');
  }
  console.log('\n');

  beautifyBenchmark(benches);
  console.log('');
}
271394
public void run() throws Exception {
    if (config == null) {
      return;
    }

    SimpleRequest req = newRequest();

    List<ManagedChannel> channels = new ArrayList<>(config.channels);
    for (int i = 0; i < config.channels; i++) {
      channels.add(config.newChannel());
    }

    // Do a warmup first. It's the same as the actual benchmark, except that
    // we ignore the statistics.
    warmup(req, channels);

    long startTime = System.nanoTime();
    long endTime = startTime + TimeUnit.SECONDS.toNanos(config.duration);
    List<Histogram> histograms = doBenchmark(req, channels, endTime);
    long elapsedTime = System.nanoTime() - startTime;

    Histogram merged = merge(histograms);

    printStats(merged, elapsedTime);
    if (config.histogramFile != null) {
      saveHistogram(merged, config.histogramFile);
    }
    shutdown(channels);
  }
1236211
function failFast(logLevel, lessThan) {
    var ll = LatticeLogs;

    if (logLevel) {
      var compareTo = lessThan || process.env.LATTICE_LOGLEVEL || ll.ERROR;
      if (!ll.equalOrBelow(logLevel, compareTo)) return true;
    }

    return /\b(NONE|OFF|NO|0)\b/i.test(process.env.LATTICE_ERRORS || '');
  }
971305
function performanceNow() {
    var perf = void 0;
    if (_isNode2['default']) {
        var performance = _requireOnNodeOnly2['default'].perfHooks.performance;

        perf = performance;
    } else perf = window.performance;

    return perf.now();
}
390213
public void benchmarkItem() throws Exception {

        // To make an asynchronous procedure call, you need a callback object
        // BenchmarkCallback is a generic callback that keeps track of the transaction results
        // for any given procedure name, which should match the procedure called below.
        ProcedureCallback callback = new BenchmarkCallback("insert_session");

        // generate some random parameter values
        int appid = rand.nextInt(50);
        int deviceid = rand.nextInt(1000000);

        // call the procedure asynchronously, passing in the callback and the procedure name,
        // followed by the input parameters
        client.callProcedure(callback,
                             "insert_session",
                             appid,
                             deviceid
                             );

    }
964259
protected void reportCachePerformance ()
    {
        if (/* Log.getLevel() != Log.log.DEBUG || */
            _improv == null ||
            _cacheStatThrottle.throttleOp()) {
            return;
        }

        // compute our estimated memory usage
        long amem = 0;
        int asize = 0;
        synchronized (_atiles) {
            // first total up the active tiles
            Iterator<SoftReference<Tile>> iter = _atiles.values().iterator();
            while (iter.hasNext()) {
                SoftReference<Tile> sref = iter.next();
                Tile tile = sref.get();
                if (tile != null) {
                    asize++;
                    amem += tile.getEstimatedMemoryUsage();
                }
            }
        }
        log.info("Tile caches", "amem", (amem / 1024) + "k",
            "tmem", (Tile._totalTileMemory / 1024) + "k", "seen", _atiles.size(), "asize", + asize);
    }
1128378
function Benchmark(name, fn) {
  this._name = name;
  this._fn = fn;
  this._async = fn.length > 1;
}
1128578
function createBenchmark( len ) {
	var x;
	var i;

	x = new Array( len );
	for ( i = 0; i < len; i++ ) {
		x[ i ] = null; // TODO: set values
	}
	return benchmark;

	/**
	* Benchmark function.
	*
	* @private
	* @param {Benchmark} b - benchmark instance
	*/
	function benchmark( b ) {
		var i;

		b.tic();
		for ( i = 0; i < b.iterations; i++ ) {
			// TODO: synchronous task
			if ( TODO/* TODO: condition */ ) {
				b.fail( 'something went wrong' );
			}
		}
		b.toc();
		if ( TODO/* TODO: condition */ ) {
			b.fail( 'something went wrong' );
		}
		b.pass( 'benchmark finished' );
		b.end();
	}
}
521971
@Benchmark
    @OperationsPerInvocation(20)
    public void benchmarkByteBuddySpecialized(Blackhole blackHole) {
        blackHole.consume(byteBuddySpecializedInstance.method(booleanValue));
        blackHole.consume(byteBuddySpecializedInstance.method(byteValue));
        blackHole.consume(byteBuddySpecializedInstance.method(shortValue));
        blackHole.consume(byteBuddySpecializedInstance.method(intValue));
        blackHole.consume(byteBuddySpecializedInstance.method(charValue));
        blackHole.consume(byteBuddySpecializedInstance.method(intValue));
        blackHole.consume(byteBuddySpecializedInstance.method(longValue));
        blackHole.consume(byteBuddySpecializedInstance.method(floatValue));
        blackHole.consume(byteBuddySpecializedInstance.method(doubleValue));
        blackHole.consume(byteBuddySpecializedInstance.method(stringValue));
        blackHole.consume(byteBuddySpecializedInstance.method(booleanValue, booleanValue, booleanValue));
        blackHole.consume(byteBuddySpecializedInstance.method(byteValue, byteValue, byteValue));
        blackHole.consume(byteBuddySpecializedInstance.method(shortValue, shortValue, shortValue));
        blackHole.consume(byteBuddySpecializedInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddySpecializedInstance.method(charValue, charValue, charValue));
        blackHole.consume(byteBuddySpecializedInstance.method(intValue, intValue, intValue));
        blackHole.consume(byteBuddySpecializedInstance.method(longValue, longValue, longValue));
        blackHole.consume(byteBuddySpecializedInstance.method(floatValue, floatValue, floatValue));
        blackHole.consume(byteBuddySpecializedInstance.method(doubleValue, doubleValue, doubleValue));
        blackHole.consume(byteBuddySpecializedInstance.method(stringValue, stringValue, stringValue));
    }
227911
@Override
    protected void doPerform() {
        org.openqa.selenium.Keys seleniumKeys = org.openqa.selenium.Keys.getKeyFromUnicode(keys.getKeyCode());
        if (isSourceDocumentRoot()) {
            keyboard().pressKey(seleniumKeys);
        } else {
            getActions().keyDown(getFirstElement(), seleniumKeys).perform();
        }
    }