package benchmarks

import "google.golang.org/protobuf/internal/testprotos/benchmarks"

Index

Variables

var File_benchmarks_proto protoreflect.FileDescriptor

Types

type BenchmarkDataset

type BenchmarkDataset struct {

	// Name of the benchmark dataset.  This should be unique across all datasets.
	// Should only contain word characters: [a-zA-Z0-9_]
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// 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.
	MessageName string `protobuf:"bytes,2,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
	// 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.
	Payload [][]byte `protobuf:"bytes,3,rep,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*BenchmarkDataset) Descriptor

func (*BenchmarkDataset) Descriptor() ([]byte, []int)

Deprecated: Use BenchmarkDataset.ProtoReflect.Descriptor instead.

func (*BenchmarkDataset) GetMessageName

func (x *BenchmarkDataset) GetMessageName() string

func (*BenchmarkDataset) GetName

func (x *BenchmarkDataset) GetName() string

func (*BenchmarkDataset) GetPayload

func (x *BenchmarkDataset) GetPayload() [][]byte

func (*BenchmarkDataset) ProtoMessage

func (*BenchmarkDataset) ProtoMessage()

func (*BenchmarkDataset) ProtoReflect

func (x *BenchmarkDataset) ProtoReflect() protoreflect.Message

func (*BenchmarkDataset) Reset

func (x *BenchmarkDataset) Reset()

func (*BenchmarkDataset) String

func (x *BenchmarkDataset) String() string

Source Files

benchmarks.pb.go

Directories

PathSynopsis
internal/testprotos/benchmarks/datasets
internal/testprotos/benchmarks/datasets/google_message1
internal/testprotos/benchmarks/datasets/google_message1/proto2
internal/testprotos/benchmarks/datasets/google_message1/proto3
internal/testprotos/benchmarks/datasets/google_message2
internal/testprotos/benchmarks/datasets/google_message3
internal/testprotos/benchmarks/datasets/google_message4
internal/testprotos/benchmarks/micro
Version
v1.36.5 (latest)
Published
Feb 6, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
10 hours ago

Tools for package owners.