Merge pull request #1267 from vjpai/timers

Infrastructure for timer insertion, logging, and testing
pull/1277/head
Craig Tiller 10 years ago
commit 5fa5042850
  1. 6
      BUILD
  2. 50
      Makefile
  3. 17
      build.json
  4. 138
      src/core/profiling/timers.c
  5. 70
      src/core/profiling/timers.h
  6. 56
      src/core/profiling/timers_preciseclock.h
  7. 7
      src/core/surface/init.c
  8. 9
      templates/Makefile.template
  9. 83
      test/core/profiling/timers_test.c
  10. 9
      tools/run_tests/tests.json
  11. 12
      vsprojects/vs2010/Grpc.mak
  12. 4
      vsprojects/vs2010/grpc.vcxproj
  13. 12
      vsprojects/vs2010/grpc.vcxproj.filters
  14. 4
      vsprojects/vs2010/grpc_unsecure.vcxproj
  15. 12
      vsprojects/vs2010/grpc_unsecure.vcxproj.filters
  16. 10
      vsprojects/vs2013/Grpc.mak
  17. 4
      vsprojects/vs2013/grpc.vcxproj
  18. 12
      vsprojects/vs2013/grpc.vcxproj.filters
  19. 4
      vsprojects/vs2013/grpc_unsecure.vcxproj
  20. 12
      vsprojects/vs2013/grpc_unsecure.vcxproj.filters

@ -186,6 +186,8 @@ cc_library(
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_log.h",
"src/core/statistics/census_rpc_stats.h",
@ -298,6 +300,7 @@ cc_library(
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/profiling/timers.c",
"src/core/statistics/census_init.c",
"src/core/statistics/census_log.c",
"src/core/statistics/census_rpc_stats.c",
@ -414,6 +417,8 @@ cc_library(
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_log.h",
"src/core/statistics/census_rpc_stats.h",
@ -506,6 +511,7 @@ cc_library(
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/profiling/timers.c",
"src/core/statistics/census_init.c",
"src/core/statistics/census_log.c",
"src/core/statistics/census_rpc_stats.c",

File diff suppressed because one or more lines are too long

@ -137,6 +137,8 @@
"src/core/json/json_common.h",
"src/core/json/json_reader.h",
"src/core/json/json_writer.h",
"src/core/profiling/timers.h",
"src/core/profiling/timers_preciseclock.h",
"src/core/statistics/census_interface.h",
"src/core/statistics/census_log.h",
"src/core/statistics/census_rpc_stats.h",
@ -230,6 +232,7 @@
"src/core/json/json_reader.c",
"src/core/json/json_string.c",
"src/core/json/json_writer.c",
"src/core/profiling/timers.c",
"src/core/statistics/census_init.c",
"src/core/statistics/census_log.c",
"src/core/statistics/census_rpc_stats.c",
@ -1765,6 +1768,20 @@
"gpr"
]
},
{
"name": "timers_test",
"build": "test",
"language": "c",
"src": [
"test/core/profiling/timers_test.c"
],
"deps": [
"grpc_test_util",
"grpc",
"gpr_test_util",
"gpr"
]
},
{
"name": "transport_metadata_test",
"build": "test",

@ -0,0 +1,138 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifdef GRPC_LATENCY_PROFILER
#include "src/core/profiling/timers.h"
#include "src/core/profiling/timers_preciseclock.h"
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpc/support/sync.h>
#include <stdio.h>
typedef struct grpc_timer_entry {
grpc_precise_clock tm;
const char* tag;
int seq;
const char* file;
int line;
} grpc_timer_entry;
struct grpc_timers_log {
gpr_mu mu;
grpc_timer_entry* log;
int num_entries;
int capacity;
int capacity_limit;
FILE* fp;
};
grpc_timers_log* grpc_timers_log_global = NULL;
grpc_timers_log* grpc_timers_log_create(int capacity_limit, FILE* dump) {
grpc_timers_log* log = gpr_malloc(sizeof(*log));
/* TODO (vpai): Allow allocation below limit */
log->log = gpr_malloc(capacity_limit * sizeof(*log->log));
/* TODO (vpai): Improve concurrency, do per-thread logging? */
gpr_mu_init(&log->mu);
log->num_entries = 0;
log->capacity = log->capacity_limit = capacity_limit;
log->fp = dump;
return log;
}
static void log_report_locked(grpc_timers_log* log) {
FILE* fp = log->fp;
int i;
for (i = 0; i < log->num_entries; i++) {
grpc_timer_entry* entry = &(log->log[i]);
fprintf(fp, "GRPC_LAT_PROF ");
grpc_precise_clock_print(&entry->tm, fp);
fprintf(fp, " %s#%d,%s:%d\n", entry->tag, entry->seq, entry->file,
entry->line);
}
/* Now clear out the log */
log->num_entries = 0;
}
void grpc_timers_log_destroy(grpc_timers_log* log) {
gpr_mu_lock(&log->mu);
log_report_locked(log);
gpr_mu_unlock(&log->mu);
gpr_free(log->log);
gpr_mu_destroy(&log->mu);
gpr_free(log);
}
void grpc_timers_log_add(grpc_timers_log* log, const char* tag, int seq,
const char* file, int line) {
grpc_timer_entry* entry;
/* TODO (vpai) : Improve concurrency */
gpr_mu_lock(&log->mu);
if (log->num_entries == log->capacity_limit) {
log_report_locked(log);
}
entry = &log->log[log->num_entries++];
grpc_precise_clock_now(&entry->tm);
entry->tag = tag;
entry->seq = seq;
entry->file = file;
entry->line = line;
gpr_mu_unlock(&log->mu);
}
void grpc_timers_log_global_init(void) {
grpc_timers_log_global = grpc_timers_log_create(100000, stdout);
}
void grpc_timers_log_global_destroy(void) {
grpc_timers_log_destroy(grpc_timers_log_global);
}
#else /* !GRPC_LATENCY_PROFILER */
void grpc_timers_log_global_init(void) {}
void grpc_timers_log_global_destroy(void) {}
#endif /* GRPC_LATENCY_PROFILER */

@ -0,0 +1,70 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_CORE_PROFILING_TIMERS_H
#define GRPC_CORE_PROFILING_TIMERS_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef GRPC_LATENCY_PROFILER
typedef struct grpc_timers_log grpc_timers_log;
grpc_timers_log *grpc_timers_log_create(int capacity_limit, FILE *dump);
void grpc_timers_log_add(grpc_timers_log *, const char *tag, int seq,
const char *file, int line);
void grpc_timers_log_destroy(grpc_timers_log *);
extern grpc_timers_log *grpc_timers_log_global;
#define GRPC_TIMER_MARK(x, s) \
grpc_timers_log_add(grpc_timers_log_global, #x, s, __FILE__, __LINE__)
#else /* !GRPC_LATENCY_PROFILER */
#define GRPC_TIMER_MARK(x, s) \
do { \
} while (0)
#endif /* GRPC_LATENCY_PROFILER */
void grpc_timers_log_global_init(void);
void grpc_timers_log_global_destroy(void);
#ifdef __cplusplus
}
#endif
#endif /* GRPC_CORE_PROFILING_TIMERS_H */

@ -0,0 +1,56 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef GRPC_CORE_PROFILING_TIMERS_PRECISECLOCK_H
#define GRPC_CORE_PROFILING_TIMERS_PRECISECLOCK_H
#include <grpc/support/time.h>
#include <stdio.h>
typedef struct grpc_precise_clock grpc_precise_clock;
#ifdef GRPC_TIMERS_RDTSC
#error RDTSC timers not currently supported
#else
struct grpc_precise_clock {
gpr_timespec clock;
};
static void grpc_precise_clock_now(grpc_precise_clock* clk) {
clk->clock = gpr_now();
}
static void grpc_precise_clock_print(const grpc_precise_clock* clk, FILE* fp) {
fprintf(fp, "%ld.%09d", clk->clock.tv_sec, clk->clock.tv_nsec);
}
#endif /* GRPC_TIMERS_RDTSC */
#endif /* GRPC_CORE_PROFILING_TIMERS_PRECISECLOCK_H */

@ -32,10 +32,11 @@
*/
#include <grpc/grpc.h>
#include "src/core/iomgr/iomgr.h"
#include "src/core/channel/channel_stack.h"
#include "src/core/debug/trace.h"
#include "src/core/iomgr/iomgr.h"
#include "src/core/statistics/census_interface.h"
#include "src/core/channel/channel_stack.h"
#include "src/core/profiling/timers.h"
#include "src/core/surface/call.h"
#include "src/core/surface/init.h"
#include "src/core/surface/surface_trace.h"
@ -63,6 +64,7 @@ void grpc_init(void) {
grpc_tracer_init("GRPC_TRACE");
grpc_iomgr_init();
census_init();
grpc_timers_log_global_init();
}
gpr_mu_unlock(&g_init_mu);
}
@ -72,6 +74,7 @@ void grpc_shutdown(void) {
if (--g_initializations == 0) {
grpc_iomgr_shutdown();
census_shutdown();
grpc_timers_log_global_destroy();
}
gpr_mu_unlock(&g_init_mu);
}

@ -96,6 +96,15 @@ CPPFLAGS_opt = -O2
LDFLAGS_opt =
DEFINES_opt = NDEBUG
VALID_CONFIG_latprof = 1
CC_latprof = $(DEFAULT_CC)
CXX_latprof = $(DEFAULT_CXX)
LD_latprof = $(DEFAULT_CC)
LDXX_latprof = $(DEFAULT_CXX)
CPPFLAGS_latprof = -O2 -DGRPC_LATENCY_PROFILER
LDFLAGS_latprof =
DEFINES_latprof = NDEBUG
VALID_CONFIG_dbg = 1
CC_dbg = $(DEFAULT_CC)
CXX_dbg = $(DEFAULT_CXX)

@ -0,0 +1,83 @@
/*
*
* Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the
* distribution.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#include "src/core/profiling/timers.h"
#include <stdlib.h>
#include "test/core/util/test_config.h"
void test_log_events(int num_seqs) {
int start = 0;
int *state;
state = calloc(num_seqs, sizeof(state[0]));
while (start < num_seqs) {
int i;
int row;
if (state[start] == 3) { /* Already done with this posn */
start++;
continue;
}
row = rand() % 10; /* how many in a row */
for (i = start; (i < start + row) && (i < num_seqs); i++) {
int j;
int advance = 1 + rand() % 3; /* how many to advance by */
for (j = 0; j < advance; j++) {
switch (state[i]) {
case 0:
GRPC_TIMER_MARK(STATE_0, i);
state[i]++;
break;
case 1:
GRPC_TIMER_MARK(STATE_1, i);
state[i]++;
break;
case 2:
GRPC_TIMER_MARK(STATE_2, i);
state[i]++;
break;
case 3:
break;
}
}
}
}
free(state);
}
int main(int argc, char **argv) {
grpc_test_init(argc, argv);
grpc_timers_log_global_init();
test_log_events(1000000);
grpc_timers_log_global_destroy();
return 0;
}

@ -594,6 +594,15 @@
"posix"
]
},
{
"flaky": false,
"language": "c",
"name": "timers_test",
"platforms": [
"windows",
"posix"
]
},
{
"flaky": false,
"language": "c",

@ -53,10 +53,10 @@ grpc_test_util:
$(OUT_DIR):
mkdir $(OUT_DIR)
buildtests: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stats_store_test.exe census_stub_test.exe census_trace_store_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe chttp2_transport_end2end_test.exe dualstack_socket_test.exe echo_test.exe fd_posix_test.exe fling_stream_test.exe fling_test.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe metadata_buffer_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe poll_kick_posix_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe tcp_client_posix_test.exe tcp_posix_test.exe tcp_server_posix_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe transport_metadata_test.exe transport_security_test.exe
buildtests: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stats_store_test.exe census_stub_test.exe census_trace_store_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe chttp2_transport_end2end_test.exe dualstack_socket_test.exe echo_test.exe fd_posix_test.exe fling_stream_test.exe fling_test.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe metadata_buffer_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe poll_kick_posix_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe tcp_client_posix_test.exe tcp_posix_test.exe tcp_server_posix_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe timers_test.exe transport_metadata_test.exe transport_security_test.exe
echo All tests built.
test: alarm_heap_test alarm_list_test alarm_test alpn_test bin_encoder_test census_hash_table_test census_statistics_multiple_writers_circular_buffer_test census_statistics_multiple_writers_test census_statistics_performance_test census_statistics_quick_test census_statistics_small_log_test census_stats_store_test census_stub_test census_trace_store_test census_window_stats_test chttp2_status_conversion_test chttp2_stream_encoder_test chttp2_stream_map_test chttp2_transport_end2end_test dualstack_socket_test echo_test fd_posix_test fling_stream_test fling_test gpr_cancellable_test gpr_cmdline_test gpr_env_test gpr_file_test gpr_histogram_test gpr_host_port_test gpr_log_test gpr_slice_buffer_test gpr_slice_test gpr_string_test gpr_sync_test gpr_thd_test gpr_time_test gpr_tls_test gpr_useful_test grpc_base64_test grpc_byte_buffer_reader_test grpc_channel_stack_test grpc_completion_queue_test grpc_credentials_test grpc_json_token_test grpc_stream_op_test hpack_parser_test hpack_table_test httpcli_format_request_test httpcli_parser_test httpcli_test json_rewrite_test json_test lame_client_test message_compress_test metadata_buffer_test multi_init_test murmur_hash_test no_server_test poll_kick_posix_test resolve_address_test secure_endpoint_test sockaddr_utils_test tcp_client_posix_test tcp_posix_test tcp_server_posix_test time_averaged_stats_test time_test timeout_encoding_test transport_metadata_test transport_security_test
test: alarm_heap_test alarm_list_test alarm_test alpn_test bin_encoder_test census_hash_table_test census_statistics_multiple_writers_circular_buffer_test census_statistics_multiple_writers_test census_statistics_performance_test census_statistics_quick_test census_statistics_small_log_test census_stats_store_test census_stub_test census_trace_store_test census_window_stats_test chttp2_status_conversion_test chttp2_stream_encoder_test chttp2_stream_map_test chttp2_transport_end2end_test dualstack_socket_test echo_test fd_posix_test fling_stream_test fling_test gpr_cancellable_test gpr_cmdline_test gpr_env_test gpr_file_test gpr_histogram_test gpr_host_port_test gpr_log_test gpr_slice_buffer_test gpr_slice_test gpr_string_test gpr_sync_test gpr_thd_test gpr_time_test gpr_tls_test gpr_useful_test grpc_base64_test grpc_byte_buffer_reader_test grpc_channel_stack_test grpc_completion_queue_test grpc_credentials_test grpc_json_token_test grpc_stream_op_test hpack_parser_test hpack_table_test httpcli_format_request_test httpcli_parser_test httpcli_test json_rewrite_test json_test lame_client_test message_compress_test metadata_buffer_test multi_init_test murmur_hash_test no_server_test poll_kick_posix_test resolve_address_test secure_endpoint_test sockaddr_utils_test tcp_client_posix_test tcp_posix_test tcp_server_posix_test time_averaged_stats_test time_test timeout_encoding_test timers_test transport_metadata_test transport_security_test
echo All tests ran.
test_gpr: gpr_cancellable_test gpr_cmdline_test gpr_env_test gpr_file_test gpr_histogram_test gpr_host_port_test gpr_log_test gpr_slice_buffer_test gpr_slice_test gpr_string_test gpr_sync_test gpr_thd_test gpr_time_test gpr_tls_test gpr_useful_test
@ -702,6 +702,14 @@ timeout_encoding_test: timeout_encoding_test.exe
echo Running timeout_encoding_test
$(OUT_DIR)\timeout_encoding_test.exe
timers_test.exe: grpc_test_util
echo Building timers_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\profiling\timers_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\timers_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\timers_test.obj
timers_test: timers_test.exe
echo Running timers_test
$(OUT_DIR)\timers_test.exe
transport_metadata_test.exe: grpc_test_util
echo Building transport_metadata_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\metadata_test.c

@ -148,6 +148,8 @@
<ClInclude Include="..\..\src\core\json\json_common.h" />
<ClInclude Include="..\..\src\core\json\json_reader.h" />
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_log.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
@ -336,6 +338,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\json\json_writer.c">
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_log.c">

@ -223,6 +223,9 @@
<ClCompile Include="..\..\src\core\json\json_writer.c">
<Filter>src\core\json</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
<Filter>src\core\profiling</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
<Filter>src\core\statistics</Filter>
</ClCompile>
@ -569,6 +572,12 @@
<ClInclude Include="..\..\src\core\json\json_writer.h">
<Filter>src\core\json</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
@ -716,6 +725,9 @@
<Filter Include="src\core\json">
<UniqueIdentifier>{e665cc0e-b994-d7c5-cc18-2007392019f0}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\profiling">
<UniqueIdentifier>{87674b72-0f05-0469-481a-bd8c7af9ad80}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\security">
<UniqueIdentifier>{1d850ac6-e639-4eab-5338-4ba40272fcc9}</UniqueIdentifier>
</Filter>

@ -132,6 +132,8 @@
<ClInclude Include="..\..\src\core\json\json_common.h" />
<ClInclude Include="..\..\src\core\json\json_reader.h" />
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_log.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
@ -280,6 +282,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\json\json_writer.c">
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_log.c">

@ -163,6 +163,9 @@
<ClCompile Include="..\..\src\core\json\json_writer.c">
<Filter>src\core\json</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
<Filter>src\core\profiling</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
<Filter>src\core\statistics</Filter>
</ClCompile>
@ -461,6 +464,12 @@
<ClInclude Include="..\..\src\core\json\json_writer.h">
<Filter>src\core\json</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
@ -605,6 +614,9 @@
<Filter Include="src\core\json">
<UniqueIdentifier>{443ffc61-1bea-2477-6e54-1ddf8c139264}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\profiling">
<UniqueIdentifier>{7f91d9bf-c9de-835a-d74d-b16f843b89a9}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\statistics">
<UniqueIdentifier>{e084164c-a069-00e3-db35-4e0b1cd6f0b7}</UniqueIdentifier>
</Filter>

@ -55,7 +55,7 @@ $(OUT_DIR):
buildtests: buildtests_c buildtests_cxx
buildtests_c: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stub_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe chttp2_transport_end2end_test.exe echo_client.exe echo_server.exe echo_test.exe fd_posix_test.exe fling_client.exe fling_server.exe fling_stream_test.exe fling_test.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe metadata_buffer_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe poll_kick_posix_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe tcp_client_posix_test.exe tcp_posix_test.exe tcp_server_posix_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe transport_metadata_test.exe transport_security_test.exe
buildtests_c: alarm_heap_test.exe alarm_list_test.exe alarm_test.exe alpn_test.exe bin_encoder_test.exe census_hash_table_test.exe census_statistics_multiple_writers_circular_buffer_test.exe census_statistics_multiple_writers_test.exe census_statistics_performance_test.exe census_statistics_quick_test.exe census_statistics_small_log_test.exe census_stub_test.exe census_window_stats_test.exe chttp2_status_conversion_test.exe chttp2_stream_encoder_test.exe chttp2_stream_map_test.exe chttp2_transport_end2end_test.exe echo_client.exe echo_server.exe echo_test.exe fd_posix_test.exe fling_client.exe fling_server.exe fling_stream_test.exe fling_test.exe gpr_cancellable_test.exe gpr_cmdline_test.exe gpr_env_test.exe gpr_file_test.exe gpr_histogram_test.exe gpr_host_port_test.exe gpr_log_test.exe gpr_slice_buffer_test.exe gpr_slice_test.exe gpr_string_test.exe gpr_sync_test.exe gpr_thd_test.exe gpr_time_test.exe gpr_tls_test.exe gpr_useful_test.exe grpc_base64_test.exe grpc_byte_buffer_reader_test.exe grpc_channel_stack_test.exe grpc_completion_queue_test.exe grpc_credentials_test.exe grpc_json_token_test.exe grpc_stream_op_test.exe hpack_parser_test.exe hpack_table_test.exe httpcli_format_request_test.exe httpcli_parser_test.exe httpcli_test.exe json_rewrite.exe json_rewrite_test.exe json_test.exe lame_client_test.exe message_compress_test.exe metadata_buffer_test.exe multi_init_test.exe murmur_hash_test.exe no_server_test.exe poll_kick_posix_test.exe resolve_address_test.exe secure_endpoint_test.exe sockaddr_utils_test.exe tcp_client_posix_test.exe tcp_posix_test.exe tcp_server_posix_test.exe time_averaged_stats_test.exe time_test.exe timeout_encoding_test.exe timers_test.exe transport_metadata_test.exe transport_security_test.exe
echo All tests built.
buildtests_cxx:
@ -693,6 +693,14 @@ timeout_encoding_test: timeout_encoding_test.exe
echo Running timeout_encoding_test
$(OUT_DIR)\timeout_encoding_test.exe
timers_test.exe: grpc_test_util $(OUT_DIR)
echo Building timers_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\profiling\timers_test.c
$(LINK) $(LFLAGS) /OUT:"$(OUT_DIR)\timers_test.exe" Debug\grpc_test_util.lib Debug\grpc.lib Debug\gpr_test_util.lib Debug\gpr.lib $(LIBS) $(OUT_DIR)\timers_test.obj
timers_test: timers_test.exe
echo Running timers_test
$(OUT_DIR)\timers_test.exe
transport_metadata_test.exe: grpc_test_util $(OUT_DIR)
echo Building transport_metadata_test
$(CC) $(CFLAGS) /Fo:$(OUT_DIR)\ ..\..\test\core\transport\metadata_test.c

@ -150,6 +150,8 @@
<ClInclude Include="..\..\src\core\json\json_common.h" />
<ClInclude Include="..\..\src\core\json\json_reader.h" />
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_log.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
@ -338,6 +340,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\json\json_writer.c">
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_log.c">

@ -223,6 +223,9 @@
<ClCompile Include="..\..\src\core\json\json_writer.c">
<Filter>src\core\json</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
<Filter>src\core\profiling</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
<Filter>src\core\statistics</Filter>
</ClCompile>
@ -569,6 +572,12 @@
<ClInclude Include="..\..\src\core\json\json_writer.h">
<Filter>src\core\json</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
@ -716,6 +725,9 @@
<Filter Include="src\core\json">
<UniqueIdentifier>{e665cc0e-b994-d7c5-cc18-2007392019f0}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\profiling">
<UniqueIdentifier>{87674b72-0f05-0469-481a-bd8c7af9ad80}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\security">
<UniqueIdentifier>{1d850ac6-e639-4eab-5338-4ba40272fcc9}</UniqueIdentifier>
</Filter>

@ -134,6 +134,8 @@
<ClInclude Include="..\..\src\core\json\json_common.h" />
<ClInclude Include="..\..\src\core\json\json_reader.h" />
<ClInclude Include="..\..\src\core\json\json_writer.h" />
<ClInclude Include="..\..\src\core\profiling\timers.h" />
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h" />
<ClInclude Include="..\..\src\core\statistics\census_interface.h" />
<ClInclude Include="..\..\src\core\statistics\census_log.h" />
<ClInclude Include="..\..\src\core\statistics\census_rpc_stats.h" />
@ -282,6 +284,8 @@
</ClCompile>
<ClCompile Include="..\..\src\core\json\json_writer.c">
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_log.c">

@ -163,6 +163,9 @@
<ClCompile Include="..\..\src\core\json\json_writer.c">
<Filter>src\core\json</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\profiling\timers.c">
<Filter>src\core\profiling</Filter>
</ClCompile>
<ClCompile Include="..\..\src\core\statistics\census_init.c">
<Filter>src\core\statistics</Filter>
</ClCompile>
@ -461,6 +464,12 @@
<ClInclude Include="..\..\src\core\json\json_writer.h">
<Filter>src\core\json</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\profiling\timers_preciseclock.h">
<Filter>src\core\profiling</Filter>
</ClInclude>
<ClInclude Include="..\..\src\core\statistics\census_interface.h">
<Filter>src\core\statistics</Filter>
</ClInclude>
@ -605,6 +614,9 @@
<Filter Include="src\core\json">
<UniqueIdentifier>{443ffc61-1bea-2477-6e54-1ddf8c139264}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\profiling">
<UniqueIdentifier>{7f91d9bf-c9de-835a-d74d-b16f843b89a9}</UniqueIdentifier>
</Filter>
<Filter Include="src\core\statistics">
<UniqueIdentifier>{e084164c-a069-00e3-db35-4e0b1cd6f0b7}</UniqueIdentifier>
</Filter>

Loading…
Cancel
Save