示例#1
0
def main():
    """run the test"""
    init_logging()
    tcpserver = TCPServer()
    start_new_thread(server, (tcpserver, ))
    sleep(1)
    test = TCPClient('127.0.0.1')
    ccon = test.connect()
    ccon.rpc_call("help")
示例#2
0
        help="Process DB in chunks of this size [default: 0 (infinity)]")
    parser.add_argument(
        "--CONTROL",
        action="store_true",
        help="Validate results. DISABLE DURING EVAL! [default: False]")
    args = parser.parse_args()

    if not args.CONTROL:
        print "WARNING: Eval mode - not checking correctness of results"

    if not args.Cc:
        args.Cc = multiprocessing.cpu_count()
    print "Using {} CPUs".format(args.Cc)

    with Timer(logstring="Init client"):
        peer = TCPClient(args.address, args.port)
        t3c = Task3Client(peer, args.n, args.m, 2**args.q, args.Cc,
                          args.chunksize)
    print

    print "Preprocessing"
    with Timer(logstring="Setup total time") as t:
        t3c.setup()
    print

    for i in range(args.qrycnt):
        print "Query", i
        with Timer(logstring="    Total".format(i)) as t:
            t3c.query(i, args.blowup)
        print
        t3c.benchmarks['c_qry_total'] = (t.secs, 0, 0)