kv["foo"] cli, plan, dead_time = build_plan(sys, CLOCK_RATE) network[(serv, serv1)] = False ignore, plan, dead_time = build_plan(network, CLOCK_RATE) print plan cli.start() cli.join() print "Total Errors:", count_errors(cli.ctrace) print "Thread 1 ran for: run time={0}, dead_time={1} slack={2}".format(cli.runtime, dead_time, cli.ctrace.slack) effective_time = cli.runtime - cli.ctrace.slack print "C-Runtime (msec):", cli.ctrace.runtime print "effecitve run time (not sleeping), seconds: ", effective_time print "Mean Time per Request (ms): ", cli.runtime * 1000 / cli.ctrace.reqcount print "(Effective) Mean Time per Request (ms): ", effective_time * 1000 / cli.ctrace.reqcount print "Slack % = {0}".format(cli.ctrace.slack * 1.0 / (cli.runtime - dead_time) * 100)
cli, plan, dead_time = build_plan(sys, CLOCK_RATE) cli2, plan2, dead_time2 = build_plan(sys2, CLOCK_RATE) strt = (time() * 1000) + 1000 cli.abstime = strt cli2.abstime = strt cli.start() cli2.start() cli.join() cli2.join() print 'Total Errors:', count_errors(cli.ctrace) print 'Thread 1 ran for: run time={0}, dead_time={1} slack={2}'.format( cli.runtime, dead_time, cli.ctrace.slack) effective_time = cli.ctrace.slack print 'C-Runtime (msec):', cli.ctrace.runtime print 'effecitve run time (not sleeping), seconds: ', effective_time print 'Mean Time per Request (ms): ', cli.runtime * 1000 / cli.ctrace.reqcount print '(Effective) Mean Time per Request (ms): ', effective_time * 1000 / cli.ctrace.reqcount mrg = merge_traces(cli.ctrace, cli2.ctrace) print 'ORDERING:'
kv = sys.store for i in xrange(500): kv['foo'] = 'bar' kv['foo'] for clk in xrange(10): cli, plan, dead_time = build_plan(sys, clk) cli.abstime = int(time() * 1000) + 100 cli.start() cli.join() if count_errors(cli.ctrace) != 0: print 'errors: '+ str(count_errors(cli.ctrace)) rate = (cli.ctrace.slack * 1000.0 / cli.ctrace.reqcount) print '@{0}ms clock, msec / req : {1}'.format(clk, rate) raise SystemExit print 'Total Errors:', count_errors(cli.ctrace) print 'Thread 1 ran for: run time={0}, dead_time={1} slack={2}'.format( cli.runtime, dead_time, cli.ctrace.slack) effective_time = cli.runtime - cli.ctrace.slack print 'C-Runtime (msec):', cli.ctrace.runtime print 'effecitve run time (not sleeping), seconds: ', effective_time