Skip to content

Commit

Permalink
Speed up tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ctiller committed Apr 20, 2017
1 parent abd8fb7 commit d47be44
Show file tree
Hide file tree
Showing 4 changed files with 743 additions and 735 deletions.
8 changes: 6 additions & 2 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1516,6 +1516,7 @@ libs:
- global
targets:
- name: alarm_test
cpu_cost: 0.1
build: test
language: c
src:
Expand Down Expand Up @@ -1699,7 +1700,7 @@ targets:
dict: test/core/end2end/fuzzers/hpack.dictionary
maxlen: 2048
- name: combiner_test
cpu_cost: 30
cpu_cost: 10
build: test
language: c
src:
Expand All @@ -1720,6 +1721,7 @@ targets:
- gpr_test_util
- gpr
- name: concurrent_connectivity_test
cpu_cost: 2.0
build: test
language: c
src:
Expand Down Expand Up @@ -1806,6 +1808,7 @@ targets:
- gpr_test_util
- gpr
- name: ev_epoll_linux_test
cpu_cost: 3
build: test
language: c
src:
Expand Down Expand Up @@ -1975,6 +1978,7 @@ targets:
- gpr_test_util
- gpr
- name: gpr_cpu_test
cpu_cost: 30
build: test
language: c
src:
Expand Down Expand Up @@ -2024,7 +2028,7 @@ targets:
- gpr_test_util
- gpr
- name: gpr_spinlock_test
cpu_cost: 10
cpu_cost: 3
build: test
language: c
src:
Expand Down
52 changes: 28 additions & 24 deletions test/core/end2end/gen_build_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,13 @@
'authority_not_supported': default_test_options,
'bad_hostname': default_test_options,
'bad_ping': connectivity_test_options._replace(proxyable=False),
'binary_metadata': default_test_options,
'binary_metadata': default_test_options._replace(cpu_cost=LOWCPU),
'resource_quota_server': default_test_options._replace(large_writes=True,
proxyable=False),
proxyable=False,
cpu_cost=LOWCPU),
'call_creds': default_test_options._replace(secure=True),
'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_after_client_done': default_test_options,
'cancel_after_client_done': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_after_invoke': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU),
'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU),
Expand All @@ -110,46 +111,49 @@
'default_host': default_test_options._replace(needs_fullstack=True,
needs_dns=True),
'disappearing_server': connectivity_test_options._replace(flaky=True),
'empty_batch': default_test_options,
'filter_causes_close': default_test_options,
'empty_batch': default_test_options._replace(cpu_cost=LOWCPU),
'filter_causes_close': default_test_options._replace(cpu_cost=LOWCPU),
'filter_call_init_fails': default_test_options,
'filter_latency': default_test_options,
'filter_latency': default_test_options._replace(cpu_cost=LOWCPU),
'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU),
'hpack_size': default_test_options._replace(proxyable=False,
traceable=False),
'high_initial_seqno': default_test_options,
traceable=False,
cpu_cost=LOWCPU),
'high_initial_seqno': default_test_options._replace(cpu_cost=LOWCPU),
'idempotent_request': default_test_options,
'invoke_large_request': default_test_options,
'keepalive_timeout': default_test_options._replace(proxyable=False),
'keepalive_timeout': default_test_options._replace(proxyable=False,
cpu_cost=LOWCPU),
'large_metadata': default_test_options,
'max_concurrent_streams': default_test_options._replace(proxyable=False),
'max_connection_age': default_test_options,
'max_concurrent_streams': default_test_options._replace(
proxyable=False, cpu_cost=LOWCPU),
'max_connection_age': default_test_options._replace(cpu_cost=LOWCPU),
'max_connection_idle': connectivity_test_options._replace(
proxyable=False, exclude_iomgrs=['uv']),
'max_message_length': default_test_options,
proxyable=False, exclude_iomgrs=['uv'], cpu_cost=LOWCPU),
'max_message_length': default_test_options._replace(cpu_cost=LOWCPU),
'negative_deadline': default_test_options,
'network_status_change': default_test_options,
'network_status_change': default_test_options._replace(cpu_cost=LOWCPU),
'no_logging': default_test_options._replace(traceable=False),
'no_op': default_test_options,
'payload': default_test_options,
'load_reporting_hook': default_test_options,
'ping_pong_streaming': default_test_options,
'ping': connectivity_test_options._replace(proxyable=False),
'ping_pong_streaming': default_test_options._replace(cpu_cost=LOWCPU),
'ping': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU),
'registered_call': default_test_options,
'request_with_flags': default_test_options._replace(
proxyable=False, cpu_cost=LOWCPU),
'request_with_payload': default_test_options,
'server_finishes_request': default_test_options,
'shutdown_finishes_calls': default_test_options,
'shutdown_finishes_tags': default_test_options,
'simple_cacheable_request': default_test_options,
'request_with_payload': default_test_options._replace(cpu_cost=LOWCPU),
'server_finishes_request': default_test_options._replace(cpu_cost=LOWCPU),
'shutdown_finishes_calls': default_test_options._replace(cpu_cost=LOWCPU),
'shutdown_finishes_tags': default_test_options._replace(cpu_cost=LOWCPU),
'simple_cacheable_request': default_test_options._replace(cpu_cost=LOWCPU),
'simple_delayed_request': connectivity_test_options,
'simple_metadata': default_test_options,
'simple_request': default_test_options,
'streaming_error_response': default_test_options,
'streaming_error_response': default_test_options._replace(cpu_cost=LOWCPU),
'trailing_metadata': default_test_options,
'write_buffering': default_test_options,
'write_buffering_at_end': default_test_options,
'write_buffering': default_test_options._replace(cpu_cost=LOWCPU),
'write_buffering_at_end': default_test_options._replace(cpu_cost=LOWCPU),
}


Expand Down
2 changes: 1 addition & 1 deletion test/core/support/mpscq_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ typedef struct {
gpr_event *start;
} thd_args;

#define THREAD_ITERATIONS 100000
#define THREAD_ITERATIONS 10000

static void test_thread(void *args) {
thd_args *a = args;
Expand Down
Loading

0 comments on commit d47be44

Please sign in to comment.