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

Unified Diff: third_party/protobuf/benchmarks/benchmarks.proto

Issue 1983203003: Update third_party/protobuf to protobuf-v3.0.0-beta-3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: owners Created 4 years, 7 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/protobuf/benchmarks/benchmarks.proto
diff --git a/third_party/protobuf/java/src/test/java/com/google/protobuf/any_test.proto b/third_party/protobuf/benchmarks/benchmarks.proto
similarity index 57%
copy from third_party/protobuf/java/src/test/java/com/google/protobuf/any_test.proto
copy to third_party/protobuf/benchmarks/benchmarks.proto
index 80173d8a0e422f62c5a769a64c2e6896a8c12d78..51c0b548779effa77f838e9137bbce6b2accb107 100644
--- a/third_party/protobuf/java/src/test/java/com/google/protobuf/any_test.proto
+++ b/third_party/protobuf/benchmarks/benchmarks.proto
@@ -29,14 +29,35 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
syntax = "proto3";
+package benchmarks;
+option java_package = "com.google.protobuf.benchmarks";
-package any_test;
+message BenchmarkDataset {
+ // Name of the benchmark dataset. This should be unique across all datasets.
+ // Should only contain word characters: [a-zA-Z0-9_]
+ string name = 1;
-option java_package = "any_test";
-option java_outer_classname = "AnyTestProto";
+ // Fully-qualified name of the protobuf message for this dataset.
+ // It will be one of the messages defined benchmark_messages_proto2.proto
+ // or benchmark_messages_proto3.proto.
+ //
+ // Implementations that do not support reflection can implement this with
+ // an explicit "if/else" chain that lists every known message defined
+ // in those files.
+ string message_name = 2;
-import "google/protobuf/any.proto";
-
-message TestAny {
- google.protobuf.Any value = 1;
+ // The payload(s) for this dataset. They should be parsed or serialized
+ // in sequence, in a loop, ie.
+ //
+ // while (!benchmarkDone) { // Benchmark runner decides when to exit.
+ // for (i = 0; i < benchmark.payload.length; i++) {
+ // parse(benchmark.payload[i])
+ // }
+ // }
+ //
+ // This is intended to let datasets include a variety of data to provide
+ // potentially more realistic results than just parsing the same message
+ // over and over. A single message parsed repeatedly could yield unusually
+ // good branch prediction performance.
+ repeated bytes payload = 3;
}
« no previous file with comments | « third_party/protobuf/benchmarks/benchmark_messages_proto3.proto ('k') | third_party/protobuf/benchmarks/generate_datasets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698