Skip to content

Commit

Permalink
end-to-end compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
a-veitch committed May 23, 2016
1 parent 013ea77 commit 30fe632
Show file tree
Hide file tree
Showing 18 changed files with 167 additions and 63 deletions.
6 changes: 6 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ cc_library(
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
Expand Down Expand Up @@ -452,6 +453,7 @@ cc_library(
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
Expand Down Expand Up @@ -630,6 +632,7 @@ cc_library(
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
Expand Down Expand Up @@ -767,6 +770,7 @@ cc_library(
"src/core/ext/lb_policy/pick_first/pick_first.c",
"src/core/ext/lb_policy/round_robin/round_robin.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
Expand Down Expand Up @@ -1484,6 +1488,7 @@ objc_library(
"src/core/ext/resolver/dns/native/dns_resolver.c",
"src/core/ext/resolver/sockaddr/sockaddr_resolver.c",
"src/core/ext/census/context.c",
"src/core/ext/census/gen/census.pb.c",
"src/core/ext/census/grpc_context.c",
"src/core/ext/census/grpc_filter.c",
"src/core/ext/census/grpc_plugin.c",
Expand Down Expand Up @@ -1656,6 +1661,7 @@ objc_library(
"src/core/ext/census/aggregation.h",
"src/core/ext/census/census_interface.h",
"src/core/ext/census/census_rpc_stats.h",
"src/core/ext/census/gen/census.pb.h",
"src/core/ext/census/grpc_filter.h",
"src/core/ext/census/mlog.h",
"src/core/ext/census/rpc_metric_id.h",
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2652,6 +2652,7 @@ LIBGRPC_SRC = \
src/core/ext/resolver/dns/native/dns_resolver.c \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
Expand Down Expand Up @@ -2975,6 +2976,7 @@ LIBGRPC_UNSECURE_SRC = \
src/core/ext/lb_policy/pick_first/pick_first.c \
src/core/ext/lb_policy/round_robin/round_robin.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
Expand Down
1 change: 1 addition & 0 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -723,6 +723,7 @@
'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
Expand Down
2 changes: 2 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ filegroups:
- src/core/ext/census/aggregation.h
- src/core/ext/census/census_interface.h
- src/core/ext/census/census_rpc_stats.h
- src/core/ext/census/gen/census.pb.h
- src/core/ext/census/grpc_filter.h
- src/core/ext/census/mlog.h
- src/core/ext/census/rpc_metric_id.h
src:
- src/core/ext/census/context.c
- src/core/ext/census/gen/census.pb.c
- src/core/ext/census/grpc_context.c
- src/core/ext/census/grpc_filter.c
- src/core/ext/census/grpc_plugin.c
Expand Down
2 changes: 2 additions & 0 deletions config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ if test "$PHP_GRPC" != "no"; then
src/core/ext/resolver/dns/native/dns_resolver.c \
src/core/ext/resolver/sockaddr/sockaddr_resolver.c \
src/core/ext/census/context.c \
src/core/ext/census/gen/census.pb.c \
src/core/ext/census/grpc_context.c \
src/core/ext/census/grpc_filter.c \
src/core/ext/census/grpc_plugin.c \
Expand Down Expand Up @@ -557,6 +558,7 @@ if test "$PHP_GRPC" != "no"; then

PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census/gen)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_config)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb)
PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1)
Expand Down
3 changes: 3 additions & 0 deletions gRPC.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/aggregation.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/rpc_metric_id.h',
Expand Down Expand Up @@ -492,6 +493,7 @@ Pod::Spec.new do |s|
'src/core/ext/resolver/dns/native/dns_resolver.c',
'src/core/ext/resolver/sockaddr/sockaddr_resolver.c',
'src/core/ext/census/context.c',
'src/core/ext/census/gen/census.pb.c',
'src/core/ext/census/grpc_context.c',
'src/core/ext/census/grpc_filter.c',
'src/core/ext/census/grpc_plugin.c',
Expand Down Expand Up @@ -649,6 +651,7 @@ Pod::Spec.new do |s|
'src/core/ext/census/aggregation.h',
'src/core/ext/census/census_interface.h',
'src/core/ext/census/census_rpc_stats.h',
'src/core/ext/census/gen/census.pb.h',
'src/core/ext/census/grpc_filter.h',
'src/core/ext/census/mlog.h',
'src/core/ext/census/rpc_metric_id.h'
Expand Down
2 changes: 2 additions & 0 deletions grpc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/census/aggregation.h )
s.files += %w( src/core/ext/census/census_interface.h )
s.files += %w( src/core/ext/census/census_rpc_stats.h )
s.files += %w( src/core/ext/census/gen/census.pb.h )
s.files += %w( src/core/ext/census/grpc_filter.h )
s.files += %w( src/core/ext/census/mlog.h )
s.files += %w( src/core/ext/census/rpc_metric_id.h )
Expand Down Expand Up @@ -471,6 +472,7 @@ Gem::Specification.new do |s|
s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c )
s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c )
s.files += %w( src/core/ext/census/context.c )
s.files += %w( src/core/ext/census/gen/census.pb.c )
s.files += %w( src/core/ext/census/grpc_context.c )
s.files += %w( src/core/ext/census/grpc_filter.c )
s.files += %w( src/core/ext/census/grpc_plugin.c )
Expand Down
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
<file baseinstalldir="/" name="src/core/ext/census/aggregation.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_interface.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/census_rpc_stats.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/mlog.h" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/rpc_metric_id.h" role="src" />
Expand Down Expand Up @@ -478,6 +479,7 @@
<file baseinstalldir="/" name="src/core/ext/resolver/dns/native/dns_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/resolver/sockaddr/sockaddr_resolver.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/gen/census.pb.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_context.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_filter.c" role="src" />
<file baseinstalldir="/" name="src/core/ext/census/grpc_plugin.c" role="src" />
Expand Down
58 changes: 41 additions & 17 deletions src/core/ext/census/census.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ syntax = "proto3";

package google.census;

import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

// All the census protos.
//
// Nomenclature note: capitalized names below (like Metric) are protos.
Expand All @@ -53,6 +50,41 @@ import "google/protobuf/timestamp.proto";
// Metric/View/Aggregation which is available to census clients is called a
// ViewAggregation.


// The following two types are copied from
// google/protobuf/{duration,timestamp}.proto. Ideally, we would be able to
// import them, but this causes compilation issues on C-based systems
// (e.g. https://koti.kapsi.fi/jpa/nanopb/), which cannot process the C++
// headers generated from the standard protobuf distribution. See the relevant
// proto files for full documentation of these types.

message Duration {
// Signed seconds of the span of time. Must be from -315,576,000,000
// to +315,576,000,000 inclusive.
int64 seconds = 1;

// Signed fractions of a second at nanosecond resolution of the span
// of time. Durations less than one second are represented with a 0
// `seconds` field and a positive or negative `nanos` field. For durations
// of one second or more, a non-zero value for the `nanos` field must be
// of the same sign as the `seconds` field. Must be from -999,999,999
// to +999,999,999 inclusive.
int32 nanos = 2;
}

message Timestamp {
// Represents seconds of UTC time since Unix epoch
// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
// 9999-12-31T23:59:59Z inclusive.
int64 seconds = 1;

// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999,999,999
// inclusive.
int32 nanos = 2;
}

// Describes a metric
message Metric {
// name of metric, e.g. rpc_latency, cpu.
Expand Down Expand Up @@ -167,7 +199,7 @@ message AggregationDescriptor {
//
// Although it is not forbidden, it is generally a bad idea to include
// non-finite values (infinities or NaNs) in the population of values, as this
// will render the `mean` and `sum_of_squared_deviation` fields meaningless.
// will render the `mean` field meaningless.
message Distribution {
// The number of values in the population. Must be non-negative.
int64 count = 1;
Expand All @@ -176,14 +208,6 @@ message Distribution {
// then this field must be zero.
double mean = 2;

// The sum of squared deviations from the mean of the values in the
// population. For values x_i this is:
//
// Sum[i=1..n]((x_i - mean)^2)
//
// If `count` is zero then this field must be zero.
double sum_of_squared_deviation = 3;

// Describes a range of population values.
message Range {
// The minimum of the population values.
Expand All @@ -194,7 +218,7 @@ message Distribution {

// The range of the population values. If `count` is zero, this field will not
// be defined.
Range range = 4;
Range range = 3;

// A Distribution may optionally contain a histogram of the values in the
// population. The histogram is given in `bucket_count` as counts of values
Expand All @@ -210,15 +234,15 @@ message Distribution {
// `bucket_boundaries`.
//
// Any suffix of trailing zero bucket_count fields may be omitted.
repeated int64 bucket_count = 5;
repeated int64 bucket_count = 4;
}

// Record summary stats over various time windows.
message IntervalStats {
// Summary statistic over a single time window.
message Window {
// The window duration.
google.protobuf.Duration window_size = 1;
Duration window_size = 1;
// The number of measurements in this window.
int64 count = 2;
// The arithmetic mean of all measurements in the window.
Expand Down Expand Up @@ -282,6 +306,6 @@ message ViewAggregations {
// Start and end timestamps over which the value was accumulated. These
// values are not relevant/defined for IntervalStats aggregations, which are
// always accumulated over a fixed time period.
google.protobuf.Timestamp start = 2;
google.protobuf.Timestamp end = 3;
Timestamp start = 2;
Timestamp end = 3;
}
Loading

0 comments on commit 30fe632

Please sign in to comment.