Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/grpc/src/proto/grpc/testing/stats.proto

Issue 1932353002: Initial checkin of gRPC to third_party/ Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/grpc/src/proto/grpc/testing/stats.proto
diff --git a/third_party/tcmalloc/chromium/src/tests/packed-cache_test.cc b/third_party/grpc/src/proto/grpc/testing/stats.proto
similarity index 59%
copy from third_party/tcmalloc/chromium/src/tests/packed-cache_test.cc
copy to third_party/grpc/src/proto/grpc/testing/stats.proto
index 7f9aea60af51d52cdf22641eacc5f5e60f6ae251..f9d116110b05e71af474199fe914aa1c935bbce4 100644
--- a/third_party/tcmalloc/chromium/src/tests/packed-cache_test.cc
+++ b/third_party/grpc/src/proto/grpc/testing/stats.proto
@@ -1,4 +1,4 @@
-// Copyright (c) 2007, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
@@ -27,36 +27,44 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// ---
-// Author: Geoff Pike
-
-#include <stdio.h>
-#include "base/logging.h"
-#include "packed-cache-inl.h"
-
-static const int kHashbits = PackedCache<64, uint64>::kHashbits;
-
-// A basic sanity test.
-void PackedCacheTest_basic() {
- PackedCache<32, uint32> cache(0);
- CHECK_EQ(cache.GetOrDefault(0, 1), 0);
- cache.Put(0, 17);
- CHECK(cache.Has(0));
- CHECK_EQ(cache.GetOrDefault(0, 1), 17);
- cache.Put(19, 99);
- CHECK(cache.Has(0) && cache.Has(19));
- CHECK_EQ(cache.GetOrDefault(0, 1), 17);
- CHECK_EQ(cache.GetOrDefault(19, 1), 99);
- // Knock <0, 17> out by using a conflicting key.
- cache.Put(1 << kHashbits, 22);
- CHECK(!cache.Has(0));
- CHECK_EQ(cache.GetOrDefault(0, 1), 1);
- CHECK_EQ(cache.GetOrDefault(1 << kHashbits, 1), 22);
+syntax = "proto3";
+
+package grpc.testing;
+
+message ServerStats {
+ // wall clock time change in seconds since last reset
+ double time_elapsed = 1;
+
+ // change in user time (in seconds) used by the server since last reset
+ double time_user = 2;
+
+ // change in server time (in seconds) used by the server process and all
+ // threads since last reset
+ double time_system = 3;
+}
+
+// Histogram params based on grpc/support/histogram.c
+message HistogramParams {
+ double resolution = 1; // first bucket is [0, 1 + resolution)
+ double max_possible = 2; // use enough buckets to allow this value
+}
+
+// Histogram data based on grpc/support/histogram.c
+message HistogramData {
+ repeated uint32 bucket = 1;
+ double min_seen = 2;
+ double max_seen = 3;
+ double sum = 4;
+ double sum_of_squares = 5;
+ double count = 6;
}
-int main(int argc, char **argv) {
- PackedCacheTest_basic();
+message ClientStats {
+ // Latency histogram. Data points are in nanoseconds.
+ HistogramData latencies = 1;
- printf("PASS\n");
- return 0;
+ // See ServerStats for details.
+ double time_elapsed = 2;
+ double time_user = 3;
+ double time_system = 4;
}
« no previous file with comments | « third_party/grpc/src/proto/grpc/testing/services.proto ('k') | third_party/grpc/src/proto/grpc/testing/test.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698