Skip to content

Commit

Permalink
Merge pull request grpc#5013 from a-veitch/tag_set_to_context
Browse files Browse the repository at this point in the history
Change all instances of census_tag_set to census_context
  • Loading branch information
Bogdan Drutu committed Feb 4, 2016
2 parents 3ad28d0 + 9ded5db commit e4fdcd9
Show file tree
Hide file tree
Showing 28 changed files with 960 additions and 1,134 deletions.
6 changes: 0 additions & 6 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ cc_library(
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/census/aggregation.h",
"src/core/census/context.h",
"src/core/census/rpc_metric_id.h",
"src/core/httpcli/httpcli_security_connector.c",
"src/core/security/base64.c",
Expand Down Expand Up @@ -379,7 +378,6 @@ cc_library(
"src/core/census/initialize.c",
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tag_set.c",
"src/core/census/tracing.c",
],
hdrs = [
Expand Down Expand Up @@ -580,7 +578,6 @@ cc_library(
"src/core/transport/transport.h",
"src/core/transport/transport_impl.h",
"src/core/census/aggregation.h",
"src/core/census/context.h",
"src/core/census/rpc_metric_id.h",
"src/core/surface/init_unsecure.c",
"src/core/profiling/basic_timers.c",
Expand Down Expand Up @@ -757,7 +754,6 @@ cc_library(
"src/core/census/initialize.c",
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tag_set.c",
"src/core/census/tracing.c",
],
hdrs = [
Expand Down Expand Up @@ -1405,7 +1401,6 @@ objc_library(
"src/core/census/initialize.c",
"src/core/census/operation.c",
"src/core/census/placeholders.c",
"src/core/census/tag_set.c",
"src/core/census/tracing.c",
],
hdrs = [
Expand Down Expand Up @@ -1602,7 +1597,6 @@ objc_library(
"src/core/support/thd_internal.h",
"src/core/support/time_precise.h",
"src/core/census/aggregation.h",
"src/core/census/context.h",
"src/core/census/rpc_metric_id.h",
],
includes = [
Expand Down
74 changes: 36 additions & 38 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,7 @@ algorithm_test: $(BINDIR)/$(CONFIG)/algorithm_test
alloc_test: $(BINDIR)/$(CONFIG)/alloc_test
alpn_test: $(BINDIR)/$(CONFIG)/alpn_test
bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test
census_context_test: $(BINDIR)/$(CONFIG)/census_context_test
channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test
chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test
chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test
Expand Down Expand Up @@ -908,7 +909,6 @@ set_initial_connect_string_test: $(BINDIR)/$(CONFIG)/set_initial_connect_string_
sockaddr_resolver_test: $(BINDIR)/$(CONFIG)/sockaddr_resolver_test
sockaddr_utils_test: $(BINDIR)/$(CONFIG)/sockaddr_utils_test
socket_utils_test: $(BINDIR)/$(CONFIG)/socket_utils_test
tag_set_test: $(BINDIR)/$(CONFIG)/tag_set_test
tcp_client_posix_test: $(BINDIR)/$(CONFIG)/tcp_client_posix_test
tcp_posix_test: $(BINDIR)/$(CONFIG)/tcp_posix_test
tcp_server_posix_test: $(BINDIR)/$(CONFIG)/tcp_server_posix_test
Expand Down Expand Up @@ -1138,6 +1138,7 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/alloc_test \
$(BINDIR)/$(CONFIG)/alpn_test \
$(BINDIR)/$(CONFIG)/bin_encoder_test \
$(BINDIR)/$(CONFIG)/census_context_test \
$(BINDIR)/$(CONFIG)/channel_create_test \
$(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \
$(BINDIR)/$(CONFIG)/chttp2_status_conversion_test \
Expand Down Expand Up @@ -1208,7 +1209,6 @@ buildtests_c: privatelibs_c \
$(BINDIR)/$(CONFIG)/sockaddr_resolver_test \
$(BINDIR)/$(CONFIG)/sockaddr_utils_test \
$(BINDIR)/$(CONFIG)/socket_utils_test \
$(BINDIR)/$(CONFIG)/tag_set_test \
$(BINDIR)/$(CONFIG)/tcp_client_posix_test \
$(BINDIR)/$(CONFIG)/tcp_posix_test \
$(BINDIR)/$(CONFIG)/tcp_server_posix_test \
Expand Down Expand Up @@ -1371,6 +1371,8 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 )
$(E) "[RUN] Testing bin_encoder_test"
$(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 )
$(E) "[RUN] Testing census_context_test"
$(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 )
$(E) "[RUN] Testing channel_create_test"
$(Q) $(BINDIR)/$(CONFIG)/channel_create_test || ( echo test channel_create_test failed ; exit 1 )
$(E) "[RUN] Testing chttp2_hpack_encoder_test"
Expand Down Expand Up @@ -1505,8 +1507,6 @@ test_c: buildtests_c
$(Q) $(BINDIR)/$(CONFIG)/sockaddr_utils_test || ( echo test sockaddr_utils_test failed ; exit 1 )
$(E) "[RUN] Testing socket_utils_test"
$(Q) $(BINDIR)/$(CONFIG)/socket_utils_test || ( echo test socket_utils_test failed ; exit 1 )
$(E) "[RUN] Testing tag_set_test"
$(Q) $(BINDIR)/$(CONFIG)/tag_set_test || ( echo test tag_set_test failed ; exit 1 )
$(E) "[RUN] Testing tcp_client_posix_test"
$(Q) $(BINDIR)/$(CONFIG)/tcp_client_posix_test || ( echo test tcp_client_posix_test failed ; exit 1 )
$(E) "[RUN] Testing tcp_posix_test"
Expand Down Expand Up @@ -2343,7 +2343,6 @@ LIBGRPC_SRC = \
src/core/census/initialize.c \
src/core/census/operation.c \
src/core/census/placeholders.c \
src/core/census/tag_set.c \
src/core/census/tracing.c \

PUBLIC_HEADERS_C += \
Expand Down Expand Up @@ -2715,7 +2714,6 @@ LIBGRPC_UNSECURE_SRC = \
src/core/census/initialize.c \
src/core/census/operation.c \
src/core/census/placeholders.c \
src/core/census/tag_set.c \
src/core/census/tracing.c \

PUBLIC_HEADERS_C += \
Expand Down Expand Up @@ -5803,6 +5801,38 @@ endif
endif


CENSUS_CONTEXT_TEST_SRC = \
test/core/census/context_test.c \

CENSUS_CONTEXT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_CONTEXT_TEST_SRC))))
ifeq ($(NO_SECURE),true)

# You can't build secure targets if you don't have OpenSSL.

$(BINDIR)/$(CONFIG)/census_context_test: openssl_dep_error

else



$(BINDIR)/$(CONFIG)/census_context_test: $(CENSUS_CONTEXT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(CENSUS_CONTEXT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/census_context_test

endif

$(OBJDIR)/$(CONFIG)/test/core/census/context_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a

deps_census_context_test: $(CENSUS_CONTEXT_TEST_OBJS:.o=.dep)

ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(CENSUS_CONTEXT_TEST_OBJS:.o=.dep)
endif
endif


CHANNEL_CREATE_TEST_SRC = \
test/core/surface/channel_create_test.c \

Expand Down Expand Up @@ -8267,38 +8297,6 @@ endif
endif


TAG_SET_TEST_SRC = \
test/core/census/tag_set_test.c \

TAG_SET_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(TAG_SET_TEST_SRC))))
ifeq ($(NO_SECURE),true)

# You can't build secure targets if you don't have OpenSSL.

$(BINDIR)/$(CONFIG)/tag_set_test: openssl_dep_error

else



$(BINDIR)/$(CONFIG)/tag_set_test: $(TAG_SET_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a
$(E) "[LD] Linking $@"
$(Q) mkdir -p `dirname $@`
$(Q) $(LD) $(LDFLAGS) $(TAG_SET_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/tag_set_test

endif

$(OBJDIR)/$(CONFIG)/test/core/census/tag_set_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a

deps_tag_set_test: $(TAG_SET_TEST_OBJS:.o=.dep)

ifneq ($(NO_SECURE),true)
ifneq ($(NO_DEPS),true)
-include $(TAG_SET_TEST_OBJS:.o=.dep)
endif
endif


TCP_CLIENT_POSIX_TEST_SRC = \
test/core/iomgr/tcp_client_posix_test.c \

Expand Down
1 change: 0 additions & 1 deletion binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,6 @@
'src/core/census/initialize.c',
'src/core/census/operation.c',
'src/core/census/placeholders.c',
'src/core/census/tag_set.c',
'src/core/census/tracing.c',
],
"conditions": [
Expand Down
18 changes: 8 additions & 10 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ filegroups:
- include/grpc/census.h
headers:
- src/core/census/aggregation.h
- src/core/census/context.h
- src/core/census/rpc_metric_id.h
src:
- src/core/census/context.c
- src/core/census/initialize.c
- src/core/census/operation.c
- src/core/census/placeholders.c
- src/core/census/tag_set.c
- src/core/census/tracing.c
- name: gpr
public_headers:
Expand Down Expand Up @@ -896,6 +894,14 @@ targets:
deps:
- grpc_test_util
- grpc
- name: census_context_test
build: test
language: c
src:
- test/core/census/context_test.c
deps:
- grpc_test_util
- grpc
- name: channel_create_test
build: test
language: c
Expand Down Expand Up @@ -1561,14 +1567,6 @@ targets:
- mac
- linux
- posix
- name: tag_set_test
build: test
language: c
src:
- test/core/census/tag_set_test.c
deps:
- grpc_test_util
- grpc
- name: tcp_client_posix_test
cpu_cost: 0.5
build: test
Expand Down
3 changes: 0 additions & 3 deletions gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ Pod::Spec.new do |s|
'src/core/support/thd_internal.h',
'src/core/support/time_precise.h',
'src/core/census/aggregation.h',
'src/core/census/context.h',
'src/core/census/rpc_metric_id.h',
'include/grpc/grpc_security.h',
'include/grpc/byte_buffer.h',
Expand Down Expand Up @@ -453,7 +452,6 @@ Pod::Spec.new do |s|
'src/core/census/initialize.c',
'src/core/census/operation.c',
'src/core/census/placeholders.c',
'src/core/census/tag_set.c',
'src/core/census/tracing.c'

ss.private_header_files = 'src/core/security/auth_filters.h',
Expand Down Expand Up @@ -594,7 +592,6 @@ Pod::Spec.new do |s|
'src/core/support/thd_internal.h',
'src/core/support/time_precise.h',
'src/core/census/aggregation.h',
'src/core/census/context.h',
'src/core/census/rpc_metric_id.h'

ss.header_mappings_dir = '.'
Expand Down
18 changes: 8 additions & 10 deletions grpc.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ EXPORTS
census_shutdown
census_supported
census_enabled
census_context_serialize
census_context_create
census_context_destroy
census_context_get_status
census_context_initialize_iterator
census_context_next_tag
census_context_get_tag
census_context_encode
census_context_decode
census_trace_mask
census_set_trace_mask
census_start_rpc_op_timestamp
Expand All @@ -16,15 +23,6 @@ EXPORTS
census_trace_scan_start
census_get_trace_record
census_trace_scan_end
census_tag_set_create
census_tag_set_destroy
census_tag_set_get_create_status
census_tag_set_initialize_iterator
census_tag_set_next_tag
census_tag_set_get_tag_by_key
census_tag_set_encode
census_tag_set_decode
census_context_tag_set
census_record_values
census_view_create
census_view_delete
Expand Down
2 changes: 0 additions & 2 deletions grpc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/support/thd_internal.h )
s.files += %w( src/core/support/time_precise.h )
s.files += %w( src/core/census/aggregation.h )
s.files += %w( src/core/census/context.h )
s.files += %w( src/core/census/rpc_metric_id.h )
s.files += %w( src/core/httpcli/httpcli_security_connector.c )
s.files += %w( src/core/security/base64.c )
Expand Down Expand Up @@ -437,7 +436,6 @@ Gem::Specification.new do |s|
s.files += %w( src/core/census/initialize.c )
s.files += %w( src/core/census/operation.c )
s.files += %w( src/core/census/placeholders.c )
s.files += %w( src/core/census/tag_set.c )
s.files += %w( src/core/census/tracing.c )
s.files += %w( third_party/boringssl/crypto/aes/internal.h )
s.files += %w( third_party/boringssl/crypto/asn1/asn1_locl.h )
Expand Down
Loading

0 comments on commit e4fdcd9

Please sign in to comment.