bench

package
v3.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

README

Results:

Results after just adding the benchmark test on commit: 5f8bf8a3fec64e2df6d1032381a6084028fd7867 (Base line no changes)

BenchmarkClientServerRoundTripSmallMsg-12 11257 105941 ns/op 17392 B/op 290 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 9408 127801 ns/op 71079 B/op 293 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3555 309087 ns/op 187275 B/op 2725 allocs/op

BenchmarkClientServerRoundTripSmallMsg-12 10671 107704 ns/op 17393 B/op 290 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 8620 132313 ns/op 71168 B/op 293 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3576 315491 ns/op 187284 B/op 2725 allocs/op

BenchmarkClientServerRoundTripSmallMsg-12 11174 110227 ns/op 17395 B/op 290 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 8658 139203 ns/op 71103 B/op 293 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3556 315230 ns/op 187242 B/op 2725 allocs/op

Results after just adding the benchmark test on commit: dad755d6cb11f4daab738eec8133554a7c3c48e7 (pre-compiled names regex)

Just focusing on optimizing Allocations per Operation for this set of changes

BenchmarkClientServerRoundTripSmallMsg-12 11971 94264 ns/op 11850 B/op 208 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 9106 114902 ns/op 65520 B/op 211 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3831 298895 ns/op 181501 B/op 2642 allocs/op

BenchmarkClientServerRoundTripSmallMsg-12 12870 92300 ns/op 11848 B/op 208 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 9277 114179 ns/op 65505 B/op 211 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3537 293994 ns/op 181645 B/op 2642 allocs/op

BenchmarkClientServerRoundTripSmallMsg-12 12685 92157 ns/op 11848 B/op 208 allocs/op BenchmarkClientServerRoundTripBigStrMsg-12 9462 115722 ns/op 65519 B/op 211 allocs/op BenchmarkClientServerRoundTripBigMapBigStrMsg-12 3644 295176 ns/op 181563 B/op 2642 allocs/op

Documentation

Overview

Package bench is a generated protocol buffer package.

It is generated from these files:

msgs.proto

It has these top-level messages:

Event
EventResponse

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Timestamp string            `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
	User      string            `protobuf:"bytes,2,opt,name=user" json:"user,omitempty"`
	Type      int32             `protobuf:"varint,3,opt,name=type" json:"type,omitempty"`
	Strdata   string            `protobuf:"bytes,4,opt,name=strdata" json:"strdata,omitempty"`
	Data      map[string]string `` /* 128-byte string literal not displayed */
}

func (*Event) Descriptor

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

func (*Event) GetData

func (m *Event) GetData() map[string]string

func (*Event) GetStrdata

func (m *Event) GetStrdata() string

func (*Event) GetTimestamp

func (m *Event) GetTimestamp() string

func (*Event) GetType

func (m *Event) GetType() int32

func (*Event) GetUser

func (m *Event) GetUser() string

func (*Event) ProtoMessage

func (*Event) ProtoMessage()

func (*Event) Reset

func (m *Event) Reset()

func (*Event) String

func (m *Event) String() string

type EventResponse

type EventResponse struct {
	Timestamp string            `protobuf:"bytes,1,opt,name=timestamp" json:"timestamp,omitempty"`
	Id        string            `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
	Strdata   string            `protobuf:"bytes,3,opt,name=strdata" json:"strdata,omitempty"`
	UserID    int32             `protobuf:"varint,4,opt,name=userID" json:"userID,omitempty"`
	Data      map[string]string `` /* 128-byte string literal not displayed */
}

func (*EventResponse) Descriptor

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

func (*EventResponse) GetData

func (m *EventResponse) GetData() map[string]string

func (*EventResponse) GetId

func (m *EventResponse) GetId() string

func (*EventResponse) GetStrdata

func (m *EventResponse) GetStrdata() string

func (*EventResponse) GetTimestamp

func (m *EventResponse) GetTimestamp() string

func (*EventResponse) GetUserID

func (m *EventResponse) GetUserID() int32

func (*EventResponse) ProtoMessage

func (*EventResponse) ProtoMessage()

func (*EventResponse) Reset

func (m *EventResponse) Reset()

func (*EventResponse) String

func (m *EventResponse) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL