def scenarios()

in tools/run_tests/performance/scenario_config.py [0:0]


    def scenarios(self):
        # TODO(ctiller): add 70% load latency test
        yield _ping_pong_scenario(
            'cpp_protobuf_async_unary_1channel_100rpcs_1MB',
            rpc_type='UNARY',
            client_type='ASYNC_CLIENT',
            server_type='ASYNC_SERVER',
            req_size=1024 * 1024,
            resp_size=1024 * 1024,
            unconstrained_client='async',
            outstanding=100,
            channels=1,
            num_clients=1,
            secure=False,
            categories=[INPROC] + [SCALABLE])

        yield _ping_pong_scenario(
            'cpp_protobuf_async_streaming_from_client_1channel_1MB',
            rpc_type='STREAMING_FROM_CLIENT',
            client_type='ASYNC_CLIENT',
            server_type='ASYNC_SERVER',
            req_size=1024 * 1024,
            resp_size=1024 * 1024,
            unconstrained_client='async',
            outstanding=1,
            channels=1,
            num_clients=1,
            secure=False,
            categories=[SMOKETEST] + [INPROC] + [SCALABLE])

        yield _ping_pong_scenario(
            'cpp_protobuf_async_unary_75Kqps_600channel_60Krpcs_300Breq_50Bresp',
            rpc_type='UNARY',
            client_type='ASYNC_CLIENT',
            server_type='ASYNC_SERVER',
            req_size=300,
            resp_size=50,
            unconstrained_client='async',
            outstanding=30000,
            channels=300,
            offered_load=37500,
            secure=False,
            async_server_threads=16,
            server_threads_per_cq=1,
            categories=[SCALABLE])

        for secure in [True, False]:
            secstr = 'secure' if secure else 'insecure'
            smoketest_categories = ([SMOKETEST] if secure else [])
            inproc_categories = ([INPROC] if not secure else [])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_ping_pong_%s' % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                use_generic_payload=True,
                async_server_threads=1,
                secure=secure,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async',
                use_generic_payload=True,
                secure=secure,
                minimal_stack=not secure,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            for mps in geometric_progression(1, 20, 10):
                yield _ping_pong_scenario(
                    'cpp_generic_async_streaming_qps_unconstrained_%smps_%s' %
                    (mps, secstr),
                    rpc_type='STREAMING',
                    client_type='ASYNC_CLIENT',
                    server_type='ASYNC_GENERIC_SERVER',
                    unconstrained_client='async',
                    use_generic_payload=True,
                    secure=secure,
                    messages_per_stream=mps,
                    minimal_stack=not secure,
                    categories=smoketest_categories + inproc_categories +
                    [SCALABLE])

            for mps in geometric_progression(1, 200, math.sqrt(10)):
                yield _ping_pong_scenario(
                    'cpp_generic_async_streaming_qps_unconstrained_%smps_%s' %
                    (mps, secstr),
                    rpc_type='STREAMING',
                    client_type='ASYNC_CLIENT',
                    server_type='ASYNC_GENERIC_SERVER',
                    unconstrained_client='async',
                    use_generic_payload=True,
                    secure=secure,
                    messages_per_stream=mps,
                    minimal_stack=not secure,
                    categories=[SWEEP])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_1channel_1MBmsg_%s' % secstr,
                rpc_type='STREAMING',
                req_size=1024 * 1024,
                resp_size=1024 * 1024,
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async',
                use_generic_payload=True,
                secure=secure,
                minimal_stack=not secure,
                categories=inproc_categories + [SCALABLE],
                channels=1,
                outstanding=100)

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_unconstrained_64KBmsg_%s' %
                secstr,
                rpc_type='STREAMING',
                req_size=64 * 1024,
                resp_size=64 * 1024,
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async',
                use_generic_payload=True,
                secure=secure,
                minimal_stack=not secure,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_unconstrained_1cq_%s' % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async-limited',
                use_generic_payload=True,
                secure=secure,
                client_threads_per_cq=1000000,
                server_threads_per_cq=1000000,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_unconstrained_2waysharedcq_%s'
                % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async',
                use_generic_payload=True,
                secure=secure,
                client_threads_per_cq=2,
                server_threads_per_cq=2,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_streaming_qps_unconstrained_1cq_%s' %
                secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                unconstrained_client='async-limited',
                secure=secure,
                client_threads_per_cq=1000000,
                server_threads_per_cq=1000000,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_streaming_qps_unconstrained_2waysharedcq_%s'
                % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                unconstrained_client='async',
                secure=secure,
                client_threads_per_cq=2,
                server_threads_per_cq=2,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_unary_qps_unconstrained_1cq_%s' % secstr,
                rpc_type='UNARY',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                unconstrained_client='async-limited',
                secure=secure,
                client_threads_per_cq=1000000,
                server_threads_per_cq=1000000,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_unary_qps_unconstrained_2waysharedcq_%s' %
                secstr,
                rpc_type='UNARY',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                unconstrained_client='async',
                secure=secure,
                client_threads_per_cq=2,
                server_threads_per_cq=2,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_GENERIC_SERVER',
                unconstrained_client='async-limited',
                use_generic_payload=True,
                async_server_threads=1,
                minimal_stack=not secure,
                secure=secure)

            yield _ping_pong_scenario(
                'cpp_protobuf_async_client_sync_server_unary_qps_unconstrained_%s'
                % (secstr),
                rpc_type='UNARY',
                client_type='ASYNC_CLIENT',
                server_type='SYNC_SERVER',
                unconstrained_client='async',
                secure=secure,
                minimal_stack=not secure,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_client_unary_1channel_64wide_128Breq_8MBresp_%s'
                % (secstr),
                rpc_type='UNARY',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                channels=1,
                outstanding=64,
                req_size=128,
                resp_size=8 * 1024 * 1024,
                secure=secure,
                minimal_stack=not secure,
                categories=inproc_categories + [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_client_sync_server_streaming_qps_unconstrained_%s'
                % secstr,
                rpc_type='STREAMING',
                client_type='ASYNC_CLIENT',
                server_type='SYNC_SERVER',
                unconstrained_client='async',
                secure=secure,
                minimal_stack=not secure,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            yield _ping_pong_scenario(
                'cpp_protobuf_async_unary_ping_pong_%s_1MB' % secstr,
                rpc_type='UNARY',
                client_type='ASYNC_CLIENT',
                server_type='ASYNC_SERVER',
                req_size=1024 * 1024,
                resp_size=1024 * 1024,
                secure=secure,
                minimal_stack=not secure,
                categories=smoketest_categories + inproc_categories +
                [SCALABLE])

            for rpc_type in [
                    'unary', 'streaming', 'streaming_from_client',
                    'streaming_from_server'
            ]:
                for synchronicity in ['sync', 'async']:
                    yield _ping_pong_scenario(
                        'cpp_protobuf_%s_%s_ping_pong_%s' %
                        (synchronicity, rpc_type, secstr),
                        rpc_type=rpc_type.upper(),
                        client_type='%s_CLIENT' % synchronicity.upper(),
                        server_type='%s_SERVER' % synchronicity.upper(),
                        async_server_threads=1,
                        minimal_stack=not secure,
                        secure=secure)

                    for size in geometric_progression(1, 1024 * 1024 * 1024 + 1,
                                                      8):
                        yield _ping_pong_scenario(
                            'cpp_protobuf_%s_%s_qps_unconstrained_%s_%db' %
                            (synchronicity, rpc_type, secstr, size),
                            rpc_type=rpc_type.upper(),
                            req_size=size,
                            resp_size=size,
                            client_type='%s_CLIENT' % synchronicity.upper(),
                            server_type='%s_SERVER' % synchronicity.upper(),
                            unconstrained_client=synchronicity,
                            secure=secure,
                            minimal_stack=not secure,
                            categories=[SWEEP])

                    yield _ping_pong_scenario(
                        'cpp_protobuf_%s_%s_qps_unconstrained_%s' %
                        (synchronicity, rpc_type, secstr),
                        rpc_type=rpc_type.upper(),
                        client_type='%s_CLIENT' % synchronicity.upper(),
                        server_type='%s_SERVER' % synchronicity.upper(),
                        unconstrained_client=synchronicity,
                        secure=secure,
                        minimal_stack=not secure,
                        server_threads_per_cq=3,
                        client_threads_per_cq=3,
                        categories=inproc_categories + [SCALABLE])

                    # TODO(vjpai): Re-enable this test. It has a lot of timeouts
                    # and hasn't yet been conclusively identified as a test failure
                    # or race in the library
                    # yield _ping_pong_scenario(
                    #     'cpp_protobuf_%s_%s_qps_unconstrained_%s_500kib_resource_quota' % (synchronicity, rpc_type, secstr),
                    #     rpc_type=rpc_type.upper(),
                    #     client_type='%s_CLIENT' % synchronicity.upper(),
                    #     server_type='%s_SERVER' % synchronicity.upper(),
                    #     unconstrained_client=synchronicity,
                    #     secure=secure,
                    #     categories=smoketest_categories+[SCALABLE],
                    #     resource_quota_size=500*1024)

                    if rpc_type == 'streaming':
                        for mps in geometric_progression(1, 20, 10):
                            yield _ping_pong_scenario(
                                'cpp_protobuf_%s_%s_qps_unconstrained_%smps_%s'
                                % (synchronicity, rpc_type, mps, secstr),
                                rpc_type=rpc_type.upper(),
                                client_type='%s_CLIENT' % synchronicity.upper(),
                                server_type='%s_SERVER' % synchronicity.upper(),
                                unconstrained_client=synchronicity,
                                secure=secure,
                                messages_per_stream=mps,
                                minimal_stack=not secure,
                                categories=inproc_categories + [SCALABLE])

                        for mps in geometric_progression(1, 200, math.sqrt(10)):
                            yield _ping_pong_scenario(
                                'cpp_protobuf_%s_%s_qps_unconstrained_%smps_%s'
                                % (synchronicity, rpc_type, mps, secstr),
                                rpc_type=rpc_type.upper(),
                                client_type='%s_CLIENT' % synchronicity.upper(),
                                server_type='%s_SERVER' % synchronicity.upper(),
                                unconstrained_client=synchronicity,
                                secure=secure,
                                messages_per_stream=mps,
                                minimal_stack=not secure,
                                categories=[SWEEP])

                    for channels in geometric_progression(
                            1, 20000, math.sqrt(10)):
                        for outstanding in geometric_progression(
                                1, 200000, math.sqrt(10)):
                            if synchronicity == 'sync' and outstanding > 1200:
                                continue
                            if outstanding < channels: continue
                            yield _ping_pong_scenario(
                                'cpp_protobuf_%s_%s_qps_unconstrained_%s_%d_channels_%d_outstanding'
                                % (synchronicity, rpc_type, secstr, channels,
                                   outstanding),
                                rpc_type=rpc_type.upper(),
                                client_type='%s_CLIENT' % synchronicity.upper(),
                                server_type='%s_SERVER' % synchronicity.upper(),
                                unconstrained_client=synchronicity,
                                secure=secure,
                                minimal_stack=not secure,
                                categories=[SWEEP],
                                channels=channels,
                                outstanding=outstanding)