Exemplo n.º 1
0
        help=
        'Pass-through the standard output instead of parsing it. No default timeout is applied.'
    )
    parser.add_argument('--timeout',
                        type=int,
                        default=None,
                        help='Set a forced timeout for transparent mode.')
    parser.add_argument(
        '--combine-cpu-gpu',
        action='store_true',
        default=False,
        help='Run the same config for CPU-only and GPU-only to compare.')
    parser.add_argument('-v', '--verbose', action='store_true', default=False)
    args = parser.parse_args()

    env = ExperimentEnv(verbose=args.verbose)
    thruput_reader = AppThruputReader(begin_after=25.0)
    env.register_reader(thruput_reader)
    loop = asyncio.get_event_loop()
    all_thruput_records = []

    pktgens = []
    if not args.emulate_io:
        for host, port in args.pktgen:
            pktgens.append(PktGenRunner(host, port))

    if args.combine_cpu_gpu:
        base_conf_name, ext = os.path.splitext(
            os.path.basename(args.element_config_to_use))
        conf_names = [
            base_conf_name + '-cpuonly' + ext,
Exemplo n.º 2
0
        self._io_batch_size = cond_io
        self._comp_batch_size = cond_comp
        self._comp_ppdepths = cond_ppdepths
        self._io_core_util_usr = result_io_usr
        self._io_core_util_sys = result_io_sys
        self._comp_core_util_usr = result_comp_usr
        self._comp_core_util_sys = result_comp_sys

    def print_result(self):
        print('Maximum throughput: {0:10}'.format(self._thruput))
        print('CPU utils: {0:6.2f} {1:6.2f} {2:6.2f} {3:6.2f}'.format(self._io_core_util_usr, self._io_core_util_sys, self._comp_core_util_usr, self._comp_core_util_sys))
        print('Conditions: {0:5} {1:5} {2:5}'.format(self._io_batch_size, self._comp_batch_size, self._comp_ppdepths))

if __name__ == '__main__':

    env = ExperimentEnv(verbose=False)
    marcel = PktGenRunner('shader-marcel.anlab', 54321)
    #iobatchsizes = [8, 16, 32, 64, 128, 256]
    #compbatchsizes = [1, 8, 16, 32, 64, 128]
    #compppdepths = [1, 8, 16, 32, 64, 128]

    iobatchsizes = [32]
    compbatchsizes = [32]
    compppdepths = [16]
    no_port = [2]
    no_cpu = [8]
    no_node = [2]
    packetsize = [64]#, 128, 256, 512, 1024, 1500]
    branch_lv = [0,1,2,3,4,5]
    speed = [1,2,4,8] #,16,32,40,80]