Bench for pushing the data to the {@link FastIntStack}.
436659
@Bench(dataProvider = "generateData")
    void benchFastIntPush(final List<Integer> intData) {
        fastInt = new FastIntStack();
        for (final Object i : intData) {
            fastInt.push((Integer) i);
        }
    }
720511
public final void push(int value)
  {

    int ff = m_firstFree;

    if ((ff + 1) >= m_mapSize)
    {
      if (null == m_map)
      {
        m_map = new int[m_blocksize];
        m_mapSize = m_blocksize;
      }
      else
      {
        m_mapSize += m_blocksize;

        int newMap[] = new int[m_mapSize];

        System.arraycopy(m_map, 0, newMap, 0, ff + 1);

        m_map = newMap;
      }
    }

    m_map[ff] = value;

    ff++;

    m_firstFree = ff;
  }
837087
public void push(long x) {
    if (this.queueSize == this.maxSize) {
      assert this.last == this.first;
      this.sumOfQueue -= this.elems.get(this.last);
      if ((++this.last) == this.maxSize)
        this.last = 0;
    } else
      this.queueSize++;
    this.sumOfQueue += x;
    this.elems.set(this.first, x);
    if ((++this.first) == this.maxSize) {
      this.first = 0;
      this.last = 0;
    }
  }
218836
public void runBenchmark() throws Exception {
        System.out.print(HORIZONTAL_RULE);
        System.out.println(" Setup & Initialization");
        System.out.println(HORIZONTAL_RULE);

        // connect to one or more servers, loop until success
        connect(config.servers);

        // preload keys if requested
        System.out.println();
        if (config.preload) {
            System.out.println("Preloading data store...");
            for(int i=0; i < config.poolsize; i++) {
                client.callProcedure(new NullCallback(),
                                     "STORE.upsert",
                                     String.format(processor.KeyFormat, i),
                                     processor.generateForStore().getStoreValue());
            }
            client.drain();
            System.out.println("Preloading complete.\n");
        }

        System.out.print(HORIZONTAL_RULE);
        System.out.println(" Starting Benchmark");
        System.out.println(HORIZONTAL_RULE);

        // create/start the requested number of threads
        Thread[] kvThreads = new Thread[config.threads];
        for (int i = 0; i < config.threads; ++i) {
            kvThreads[i] = new Thread(new KVThread());
            kvThreads[i].start();
        }

        // Run the benchmark loop for the requested warmup time
        System.out.println("Warming up...");
        Thread.sleep(1000l * config.warmup);

        // signal to threads to end the warmup phase
        warmupComplete.set(true);

        // reset the stats after warmup
        fullStatsContext.fetchAndResetBaseline();
        periodicStatsContext.fetchAndResetBaseline();

        // print periodic statistics to the console
        benchmarkStartTS = System.currentTimeMillis();

        schedulePeriodicStats();

        // Run the benchmark loop for the requested warmup time
        System.out.println("\nRunning benchmark...");
        Thread.sleep(1000l * config.duration);

        // stop the threads
        benchmarkComplete.set(true);

        // cancel periodic stats printing
        timer.cancel();

        // block until all outstanding txns return
        client.drain();

        // join on the threads
        for (Thread t : kvThreads) {
            t.join();
        }

        // print the summary results
        printResults();

        // close down the client connections
        client.close();
    }
1188035
final boolean tryPushStack(Completion c) {
    Completion h = stack;
    lazySetNext(c, h);
    return U.compareAndSwapObject(this, STACK, h, c);
  }
988792
function insertQueueStep(step, index) {
  if (index && index < currentSteps.length) {
    return currentSteps.splice(index, 0, step);
  }

  return currentSteps.push(step);
}
248730
@Bench(runs = RUNS)
    public void vectorAdd() {
        vector = new Vector<Integer>();
        for (final int i : intData) {
            vector.add(i);
        }
    }
929066
public Matrix4x3fStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }
720858
public Matrix4x3dStack pushMatrix() {
        if (curr == mats.length) {
            throw new IllegalStateException("max stack size of " + (curr + 1) + " reached"); //$NON-NLS-1$ //$NON-NLS-2$
        }
        mats[curr++].set(this);
        return this;
    }
157950
@Override
    protected  void pushToSystem(HashMap<String, Object> cacheData, int supportedActions) {
        MouseInput.getInstance().notifyDragStart();
        ((MonocleApplication) Application.GetApplication()).enterDnDEventLoop();
        actionPerformed(Clipboard.ACTION_COPY_OR_MOVE);
    }
1285988
void push( int slots ) {
    assert 0 <= slots && slots < 1000;
    int len = _d.length;
    _sp += slots;
    while( _sp > len ) {
      _key= Arrays.copyOf(_key,len<<1);
      _ary= Arrays.copyOf(_ary,len<<1);
      _d  = Arrays.copyOf(_d  ,len<<1);
      _fcn= Arrays.copyOf(_fcn,len<<=1);
      _str= Arrays.copyOf(_str,len<<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();
	}
}
89206
public void push(T token) {
        if (token == lastPushed) return;
        lastPushed = token;
        if (token.getChannel() == TokenChannel.Default) {
            main.add(token);
        }
        all.add(token);
    }
164486
def push(self, el):
        
        count = next(self.counter)
        heapq.heappush(self._queue, (el, count))
612998
public void startBenchmark() {
    startTime = System.currentTimeMillis();
    LOG.info("Start to benchmark chronos server");

    Thread t = new Thread() { // new thread to output the metrics
      @Override
      public void run() {
        final long collectPeriod = 10000;
        LOG.info("Start another thread to export benchmark metrics every " + collectPeriod / 1000.0
            + " second");

        int totalCount;
        int totalLatency;
        long exportTime;
        int lastTotalCount = 0;
        int lastTotalLatency = 0;
        long lastExportTime = startTime;

        while (true) {
          try {
            Thread.sleep(collectPeriod);
          } catch (InterruptedException e) {
            LOG.error("Interrupt when sleep to get benchmark metrics, exit immediately");
            System.exit(0);
          }

          exportTime = System.currentTimeMillis();
          totalCount = totalCountInteger.get();
          totalLatency = totalLatencyInteger.get();

          double totalCostTime = (exportTime - startTime) / 1000.0;
          double costTime = (exportTime - lastExportTime) / 1000.0;
          double qps = (totalCount - lastTotalCount) / costTime;
          double latency = (totalLatency - lastTotalLatency) * 1.0 / (totalCount - lastTotalCount);
          System.out.println("Total " + totalCostTime + ", in " + costTime + " seconds, qps: "
              + qps + ", latency: " + latency + "ms");

          lastTotalCount = totalCount;
          lastTotalLatency = totalLatency;
          lastExportTime = exportTime;
        }
      }
    };

    t.setDaemon(true);
    t.start();

    while (true) {
      try {
        long start = System.currentTimeMillis();
        currentTimestamp = chronosClient.getTimestamp();
        totalCountInteger.incrementAndGet();
        totalLatencyInteger.addAndGet((int) (System.currentTimeMillis() - start));

        if (currentTimestamp <= previousTimestamp) { // check correctness
          LOG.error("Fatal error to get a lower timestamp " + currentTimestamp + "(previous is "
              + previousTimestamp + "), exit immediately");
          System.exit(0);
        }
        previousTimestamp = currentTimestamp;

        if (isFailover == true) { // calculate failover time
          double failoverTime = (System.currentTimeMillis() - failoverStartTime) / 1000.0;
          System.out.println("After " + failoverStartTimeString + ", the total failover time is "
              + failoverTime + " seconds");
        }
        isFailover = false;
      } catch (IOException e) {
        LOG.error("Exception to get timestamp");

        if (isFailover == false) {
          failoverStartTime = System.currentTimeMillis();
          failoverStartTimeString = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date(
              failoverStartTime));
          LOG.info("Failover occurs at " + failoverStartTimeString);
        }
        isFailover = true;
      }
    }

  }
1236247
protected void HandelStack()
	{
    	// Find out what the operator does to the stack
    	int StackHandel = StackOpp();
    	if (StackHandel < 2)
    	{
    		// The operators that enlarge the stack by one
    		if (StackHandel==1)
    			PushStack();
    		// The operators that pop the stack
    		else
    		{
    			// Abs value for the for loop
    			StackHandel *= -1;
    			for (int i=0;i<StackHandel;i++)
    				PopStack();
    		}
    		
    	}
    	// All other flush the stack
    	else
    		EmptyStack();		
	}
1121080
public void push(final V value) throws IndexOutOfBoundsException {
        if (top + locals >= values.length) {
            throw new IndexOutOfBoundsException(
                    "Insufficient maximum stack size.");
        }
        values[top++ + locals] = value;
    }