Did I find the right examples for you? yes no

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)

src/b/e/bench-HEAD/benchmark.py   bench(Download)
import random, time, sys
from multiprocessing import Pool, Process, Pipe, JoinableQueue
from config import (NUM_WORKERS, PLAYERS_PER_WORKER, NUM_PLAYERS, DATABASE, 
                   SHOW_GAME_STATISTICS, GAME_ENABLE_LOG, TOTAL_TIME, 
                   SAMPLE_INTERVAL)
                print >>sys.stderr, "Statistics:", db.get_stats()
 
            if SAMPLE_INTERVAL is not None and time.time() - last_sample > SAMPLE_INTERVAL:
                samples.append(qps)
                last_sample = time.time()
    print >>sys.stderr, "Average actions per second", sum_qps / total_samples
 
    if SAMPLE_INTERVAL is not None:
        # For javascript output
        print "sample_interval = %s;" % SAMPLE_INTERVAL