Skip to content

Commit

Permalink
Revise server code and remove gRPC-related flags
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerwins committed Dec 14, 2023
1 parent c93f27f commit b3bec3d
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 149 deletions.
18 changes: 0 additions & 18 deletions cmd/yorkie/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,24 +181,6 @@ func init() {
"",
"RPC key file's path",
)
cmd.Flags().Uint64Var(
&conf.RPC.MaxRequestBytes,
"rpc-max-requests-bytes",
server.DefaultRPCMaxRequestsBytes,
"Maximum client request size in bytes the server will accept.",
)
cmd.Flags().StringVar(
&conf.RPC.MaxConnectionAge,
"rpc-max-connection-age",
server.DefaultRPCMaxConnectionAge.String(),
"Maximum duration of connection may exist before it will be closed by sending a GoAway.",
)
cmd.Flags().StringVar(
&conf.RPC.MaxConnectionAgeGrace,
"rpc-max-connection-age-grace",
server.DefaultRPCMaxConnectionAgeGrace.String(),
"Additional grace period after MaxConnectionAge after which connections will be forcibly closed.",
)
cmd.Flags().IntVar(
&conf.Profiling.Port,
"profiling-port",
Expand Down
12 changes: 0 additions & 12 deletions server/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,18 +140,6 @@ func (c *Config) ensureDefaultValue() {
c.RPC.Port = DefaultRPCPort
}

if c.RPC.MaxRequestBytes == 0 {
c.RPC.MaxRequestBytes = DefaultRPCMaxRequestsBytes
}

if c.RPC.MaxConnectionAge == "" {
c.RPC.MaxConnectionAge = DefaultRPCMaxConnectionAge.String()
}

if c.RPC.MaxConnectionAgeGrace == "" {
c.RPC.MaxConnectionAgeGrace = DefaultRPCMaxConnectionAgeGrace.String()
}

if c.Profiling.Port == 0 {
c.Profiling.Port = DefaultProfilingPort
}
Expand Down
32 changes: 0 additions & 32 deletions server/rpc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import (
"errors"
"fmt"
"os"
"time"
)

var (
Expand All @@ -30,10 +29,6 @@ var (
ErrInvalidCertFile = errors.New("invalid cert file for RPC server")
// ErrInvalidKeyFile occurs when the key file is invalid.
ErrInvalidKeyFile = errors.New("invalid key file for RPC server")
// ErrInvalidMaxConnectionAge occurs when the max connection age is invalid.
ErrInvalidMaxConnectionAge = errors.New("invalid max connection age for RPC server")
// ErrInvalidMaxConnectionAgeGrace occurs when the max connection age grace is invalid.
ErrInvalidMaxConnectionAgeGrace = errors.New("invalid max connection age grace for RPC server")
)

// Config is the configuration for creating a Server instance.
Expand All @@ -46,17 +41,6 @@ type Config struct {

// KeyFile is the path to the key file.
KeyFile string `yaml:"KeyFile"`

// MaxRequestBytes is the maximum client request size in bytes the server will accept.
MaxRequestBytes uint64 `yaml:"MaxRequestBytes"`

// MaxConnectionAge is a duration for the maximum amount of time a connection may exist
// before it will be closed by sending a GoAway.
MaxConnectionAge string `yaml:"MaxConnectionAge"`

// MaxConnectionAgeGrace is a duration for the amount of time after receiving a GoAway
// for pending RPCs to complete before forcibly closing connections.
MaxConnectionAgeGrace string `yaml:"MaxConnectionAgeGrace"`
}

// Validate validates the port number and the files for certification.
Expand All @@ -78,21 +62,5 @@ func (c *Config) Validate() error {
}
}

if _, err := time.ParseDuration(c.MaxConnectionAge); err != nil {
return fmt.Errorf(
"%s: %w",
c.MaxConnectionAge,
ErrInvalidMaxConnectionAge,
)
}

if _, err := time.ParseDuration(c.MaxConnectionAgeGrace); err != nil {
return fmt.Errorf(
"%s: %w",
c.MaxConnectionAgeGrace,
ErrInvalidMaxConnectionAgeGrace,
)
}

return nil
}
98 changes: 34 additions & 64 deletions server/rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ package rpc

import (
"context"
"errors"
"fmt"
"math"
"net/http"
"time"

Expand All @@ -41,7 +43,6 @@ import (
// Server is a normal server that processes the logic requested by the client.
type Server struct {
conf *Config
serverMux *http.ServeMux
httpServer *http.Server
yorkieServiceCancel context.CancelFunc
tokenManager *auth.TokenManager
Expand All @@ -54,36 +55,36 @@ func NewServer(conf *Config, be *backend.Backend) (*Server, error) {
be.Config.ParseAdminTokenDuration(),
)

interceptor := connect.WithInterceptors(
connecthelper.NewLoggingInterceptor(),
interceptors.NewAdminAuthInterceptor(be, tokenManager),
interceptors.NewContextInterceptor(be),
interceptors.NewDefaultInterceptor(),
)

// TODO(krapie): find corresponding http/net server configurations that matches with gRPC server options
opts := []connect.HandlerOption{
connect.WithInterceptors(
connecthelper.NewLoggingInterceptor(),
interceptors.NewAdminAuthInterceptor(be, tokenManager),
interceptors.NewContextInterceptor(be),
interceptors.NewDefaultInterceptor(),
),
}

yorkieServiceCtx, yorkieServiceCancel := context.WithCancel(context.Background())

serverMux := http.NewServeMux()
serverMux.Handle(v1connect.NewYorkieServiceHandler(
newYorkieServer(yorkieServiceCtx, be),
interceptor,
))
serverMux.Handle(v1connect.NewAdminServiceHandler(
newAdminServer(be, tokenManager),
interceptor,
))
serverMux.Handle(grpchealth.NewHandler(grpchealth.NewStaticChecker(
mux := http.NewServeMux()
mux.Handle(v1connect.NewYorkieServiceHandler(newYorkieServer(yorkieServiceCtx, be), opts...))
mux.Handle(v1connect.NewAdminServiceHandler(newAdminServer(be, tokenManager), opts...))
mux.Handle(grpchealth.NewHandler(grpchealth.NewStaticChecker(
grpchealth.HealthV1ServiceName,
v1connect.YorkieServiceName,
v1connect.AdminServiceName,
)))

// TODO(hackerwins): We need to provide proper http server configuration.
return &Server{
conf: conf,
serverMux: serverMux,
httpServer: &http.Server{Addr: fmt.Sprintf(":%d", conf.Port)},
conf: conf,
httpServer: &http.Server{
Addr: fmt.Sprintf(":%d", conf.Port),
Handler: h2c.NewHandler(newCORS().Handler(mux),
&http2.Server{
MaxConcurrentStreams: math.MaxUint32,
},
),
},
yorkieServiceCancel: yorkieServiceCancel,
}, nil
}
Expand Down Expand Up @@ -112,17 +113,15 @@ func (s *Server) Shutdown(graceful bool) {
func (s *Server) listenAndServe() error {
go func() {
logging.DefaultLogger().Infof(fmt.Sprintf("serving RPC on %d", s.conf.Port))
s.httpServer.Handler = h2c.NewHandler(
newCORS().Handler(s.serverMux),
&http2.Server{},
)

if s.conf.CertFile != "" && s.conf.KeyFile != "" {
if err := s.httpServer.ListenAndServeTLS(s.conf.CertFile, s.conf.KeyFile); err != http.ErrServerClosed {
if err := s.httpServer.ListenAndServeTLS(s.conf.CertFile, s.conf.KeyFile); !errors.Is(err, http.ErrServerClosed) {
logging.DefaultLogger().Errorf("HTTP server ListenAndServeTLS: %v", err)
}
return
}
if err := s.httpServer.ListenAndServe(); err != http.ErrServerClosed {

if err := s.httpServer.ListenAndServe(); !errors.Is(err, http.ErrServerClosed) {
logging.DefaultLogger().Errorf("HTTP server ListenAndServe: %v", err)
}
return
Expand All @@ -140,43 +139,14 @@ func newCORS() *cors.Cors {
http.MethodDelete,
},
AllowOriginFunc: func(origin string) bool {
// TODO(hackerwins): We need to provide a way to configure allow origins in the dashboard.
return true
},
AllowedHeaders: []string{
"Grpc-Timeout",
"Content-Type",
"Keep-Alive",
"User-Agent",
"Cache-Control",
"Content-Type",
"Content-Transfer-Encoding",
"Custom-Header-1",
"Connect-Protocol-Version",
"X-Accept-Content-Transfer-Encoding",
"X-Accept-Response-Streaming",
"X-User-Agent",
"X-Yorkie-User-Agent",
"X-Grpc-Web",
"Authorization",
"X-API-Key",
"X-Shard-Key",
},
MaxAge: int(1728 * time.Second),
ExposedHeaders: []string{
"Accept",
"Accept-Encoding",
"Accept-Post",
"Connect-Accept-Encoding",
"Connect-Content-Encoding",
"Content-Encoding",
"Grpc-Accept-Encoding",
"Grpc-Encoding",
"Grpc-Message",
"Grpc-Status",
"Grpc-Status-Details-Bin",
"X-Custom-Header",
"Custom-Header-1",
},
AllowedHeaders: []string{"*"},
ExposedHeaders: []string{"*"},
// MaxAge indicates how long (in seconds) the results of a preflight request
// can be cached. FF caps this value at 24h, and modern Chrome caps it at 2h.
MaxAge: int(2 * time.Hour / time.Second),
AllowCredentials: true,
})
}
21 changes: 7 additions & 14 deletions server/rpc/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,7 @@ func TestMain(m *testing.M) {
}

testRPCServer, err = rpc.NewServer(&rpc.Config{
Port: helper.RPCPort,
MaxRequestBytes: helper.RPCMaxRequestBytes,
MaxConnectionAge: helper.RPCMaxConnectionAge.String(),
MaxConnectionAgeGrace: helper.RPCMaxConnectionAgeGrace.String(),
Port: helper.RPCPort,
}, be)
if err != nil {
log.Fatal(err)
Expand Down Expand Up @@ -1013,20 +1010,16 @@ func TestConfig_Validate(t *testing.T) {
{config: &rpc.Config{Port: 8080, KeyFile: "noSuchKeyFile"}, expected: rpc.ErrInvalidKeyFile},
// not to use tls
{config: &rpc.Config{
Port: 8080,
CertFile: "",
KeyFile: "",
MaxConnectionAge: "50s",
MaxConnectionAgeGrace: "10s",
Port: 8080,
CertFile: "",
KeyFile: "",
},
expected: nil},
// pass any file existing
{config: &rpc.Config{
Port: 8080,
CertFile: "server_test.go",
KeyFile: "server_test.go",
MaxConnectionAge: "50s",
MaxConnectionAgeGrace: "10s",
Port: 8080,
CertFile: "server_test.go",
KeyFile: "server_test.go",
},
expected: nil},
}
Expand Down
1 change: 0 additions & 1 deletion test/bench/grpc_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ var defaultServer *server.Yorkie

func startDefaultServer() {
config := helper.TestConfig()
config.RPC.MaxRequestBytes = uint64(10 * 1024 * 1024)
svr, err := server.New(config)
if err != nil {
logging.DefaultLogger().Fatal(err)
Expand Down
10 changes: 2 additions & 8 deletions test/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ var testStartedAt int64

// Below are the values of the Yorkie config used in the test.
var (
RPCPort = 21101
RPCMaxRequestBytes = uint64(4 * 1024 * 1024)
RPCMaxConnectionAge = 8 * gotime.Second
RPCMaxConnectionAgeGrace = 2 * gotime.Second
RPCPort = 21101

ProfilingPort = 21102

Expand Down Expand Up @@ -200,10 +197,7 @@ func TestConfig() *server.Config {
portOffset += 100
return &server.Config{
RPC: &rpc.Config{
Port: RPCPort + portOffset,
MaxRequestBytes: RPCMaxRequestBytes,
MaxConnectionAge: RPCMaxConnectionAge.String(),
MaxConnectionAgeGrace: RPCMaxConnectionAgeGrace.String(),
Port: RPCPort + portOffset,
},
Profiling: &profiling.Config{
Port: ProfilingPort + portOffset,
Expand Down

1 comment on commit b3bec3d

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Go Benchmark

Benchmark suite Current: b3bec3d Previous: 3ebef65 Ratio
BenchmarkDocument/constructor_test - ns/op 1347 ns/op 1373 ns/op 0.98
BenchmarkDocument/constructor_test - B/op 1208 B/op 1208 B/op 1
BenchmarkDocument/constructor_test - allocs/op 20 allocs/op 20 allocs/op 1
BenchmarkDocument/status_test - ns/op 784.3 ns/op 796.5 ns/op 0.98
BenchmarkDocument/status_test - B/op 1176 B/op 1176 B/op 1
BenchmarkDocument/status_test - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkDocument/equals_test - ns/op 7165 ns/op 8302 ns/op 0.86
BenchmarkDocument/equals_test - B/op 6913 B/op 6913 B/op 1
BenchmarkDocument/equals_test - allocs/op 120 allocs/op 120 allocs/op 1
BenchmarkDocument/nested_update_test - ns/op 16210 ns/op 16598 ns/op 0.98
BenchmarkDocument/nested_update_test - B/op 11963 B/op 11962 B/op 1.00
BenchmarkDocument/nested_update_test - allocs/op 254 allocs/op 254 allocs/op 1
BenchmarkDocument/delete_test - ns/op 23490 ns/op 22626 ns/op 1.04
BenchmarkDocument/delete_test - B/op 15187 B/op 15188 B/op 1.00
BenchmarkDocument/delete_test - allocs/op 333 allocs/op 333 allocs/op 1
BenchmarkDocument/object_test - ns/op 8476 ns/op 8699 ns/op 0.97
BenchmarkDocument/object_test - B/op 6721 B/op 6721 B/op 1
BenchmarkDocument/object_test - allocs/op 116 allocs/op 116 allocs/op 1
BenchmarkDocument/array_test - ns/op 29090 ns/op 29401 ns/op 0.99
BenchmarkDocument/array_test - B/op 11819 B/op 11819 B/op 1
BenchmarkDocument/array_test - allocs/op 270 allocs/op 270 allocs/op 1
BenchmarkDocument/text_test - ns/op 30575 ns/op 31226 ns/op 0.98
BenchmarkDocument/text_test - B/op 14796 B/op 14795 B/op 1.00
BenchmarkDocument/text_test - allocs/op 468 allocs/op 468 allocs/op 1
BenchmarkDocument/text_composition_test - ns/op 29095 ns/op 29299 ns/op 0.99
BenchmarkDocument/text_composition_test - B/op 18276 B/op 18278 B/op 1.00
BenchmarkDocument/text_composition_test - allocs/op 477 allocs/op 477 allocs/op 1
BenchmarkDocument/rich_text_test - ns/op 80748 ns/op 82820 ns/op 0.97
BenchmarkDocument/rich_text_test - B/op 38541 B/op 38540 B/op 1.00
BenchmarkDocument/rich_text_test - allocs/op 1147 allocs/op 1147 allocs/op 1
BenchmarkDocument/counter_test - ns/op 16839 ns/op 17386 ns/op 0.97
BenchmarkDocument/counter_test - B/op 10210 B/op 10210 B/op 1
BenchmarkDocument/counter_test - allocs/op 236 allocs/op 236 allocs/op 1
BenchmarkDocument/text_edit_gc_100 - ns/op 2921706 ns/op 2970186 ns/op 0.98
BenchmarkDocument/text_edit_gc_100 - B/op 1655004 B/op 1655326 B/op 1.00
BenchmarkDocument/text_edit_gc_100 - allocs/op 17091 allocs/op 17093 allocs/op 1.00
BenchmarkDocument/text_edit_gc_1000 - ns/op 236175567 ns/op 231735416 ns/op 1.02
BenchmarkDocument/text_edit_gc_1000 - B/op 144355707 B/op 144366033 B/op 1.00
BenchmarkDocument/text_edit_gc_1000 - allocs/op 200958 allocs/op 201007 allocs/op 1.00
BenchmarkDocument/text_split_gc_100 - ns/op 3386974 ns/op 3385194 ns/op 1.00
BenchmarkDocument/text_split_gc_100 - B/op 2313530 B/op 2313331 B/op 1.00
BenchmarkDocument/text_split_gc_100 - allocs/op 16194 allocs/op 16194 allocs/op 1
BenchmarkDocument/text_split_gc_1000 - ns/op 297684579 ns/op 296761342 ns/op 1.00
BenchmarkDocument/text_split_gc_1000 - B/op 228896792 B/op 228881832 B/op 1.00
BenchmarkDocument/text_split_gc_1000 - allocs/op 203961 allocs/op 203904 allocs/op 1.00
BenchmarkDocument/text_delete_all_10000 - ns/op 11750523 ns/op 11146892 ns/op 1.05
BenchmarkDocument/text_delete_all_10000 - B/op 5809842 B/op 5810543 B/op 1.00
BenchmarkDocument/text_delete_all_10000 - allocs/op 40672 allocs/op 40675 allocs/op 1.00
BenchmarkDocument/text_delete_all_100000 - ns/op 192657954 ns/op 187188955 ns/op 1.03
BenchmarkDocument/text_delete_all_100000 - B/op 81902617 B/op 81887592 B/op 1.00
BenchmarkDocument/text_delete_all_100000 - allocs/op 411629 allocs/op 411550 allocs/op 1.00
BenchmarkDocument/text_100 - ns/op 228993 ns/op 232235 ns/op 0.99
BenchmarkDocument/text_100 - B/op 118482 B/op 118483 B/op 1.00
BenchmarkDocument/text_100 - allocs/op 5080 allocs/op 5080 allocs/op 1
BenchmarkDocument/text_1000 - ns/op 2437065 ns/op 2502773 ns/op 0.97
BenchmarkDocument/text_1000 - B/op 1153070 B/op 1153073 B/op 1.00
BenchmarkDocument/text_1000 - allocs/op 50084 allocs/op 50084 allocs/op 1
BenchmarkDocument/array_1000 - ns/op 1245157 ns/op 1267389 ns/op 0.98
BenchmarkDocument/array_1000 - B/op 1091185 B/op 1091268 B/op 1.00
BenchmarkDocument/array_1000 - allocs/op 11825 allocs/op 11826 allocs/op 1.00
BenchmarkDocument/array_10000 - ns/op 13235254 ns/op 13549731 ns/op 0.98
BenchmarkDocument/array_10000 - B/op 9799994 B/op 9800047 B/op 1.00
BenchmarkDocument/array_10000 - allocs/op 120292 allocs/op 120291 allocs/op 1.00
BenchmarkDocument/array_gc_100 - ns/op 153064 ns/op 153664 ns/op 1.00
BenchmarkDocument/array_gc_100 - B/op 132485 B/op 132498 B/op 1.00
BenchmarkDocument/array_gc_100 - allocs/op 1248 allocs/op 1248 allocs/op 1
BenchmarkDocument/array_gc_1000 - ns/op 1419083 ns/op 1451255 ns/op 0.98
BenchmarkDocument/array_gc_1000 - B/op 1158870 B/op 1158965 B/op 1.00
BenchmarkDocument/array_gc_1000 - allocs/op 12864 allocs/op 12865 allocs/op 1.00
BenchmarkDocument/counter_1000 - ns/op 212872 ns/op 215664 ns/op 0.99
BenchmarkDocument/counter_1000 - B/op 192852 B/op 192852 B/op 1
BenchmarkDocument/counter_1000 - allocs/op 5765 allocs/op 5765 allocs/op 1
BenchmarkDocument/counter_10000 - ns/op 2212818 ns/op 2222359 ns/op 1.00
BenchmarkDocument/counter_10000 - B/op 2087782 B/op 2087783 B/op 1.00
BenchmarkDocument/counter_10000 - allocs/op 59772 allocs/op 59772 allocs/op 1
BenchmarkDocument/object_1000 - ns/op 1425433 ns/op 1433455 ns/op 0.99
BenchmarkDocument/object_1000 - B/op 1427820 B/op 1427946 B/op 1.00
BenchmarkDocument/object_1000 - allocs/op 9844 allocs/op 9845 allocs/op 1.00
BenchmarkDocument/object_10000 - ns/op 15025673 ns/op 14878581 ns/op 1.01
BenchmarkDocument/object_10000 - B/op 12166632 B/op 12167003 B/op 1.00
BenchmarkDocument/object_10000 - allocs/op 100559 allocs/op 100561 allocs/op 1.00
BenchmarkDocument/tree_100 - ns/op 1079193 ns/op 722947 ns/op 1.49
BenchmarkDocument/tree_100 - B/op 943679 B/op 442891 B/op 2.13
BenchmarkDocument/tree_100 - allocs/op 6099 allocs/op 4506 allocs/op 1.35
BenchmarkDocument/tree_1000 - ns/op 78283607 ns/op 48715965 ns/op 1.61
BenchmarkDocument/tree_1000 - B/op 86460500 B/op 35222566 B/op 2.45
BenchmarkDocument/tree_1000 - allocs/op 60113 allocs/op 44119 allocs/op 1.36
BenchmarkDocument/tree_10000 - ns/op 9803510453 ns/op 6243742972 ns/op 1.57
BenchmarkDocument/tree_10000 - B/op 8580969736 B/op 3439193776 B/op 2.50
BenchmarkDocument/tree_10000 - allocs/op 600204 allocs/op 440204 allocs/op 1.36
BenchmarkDocument/tree_delete_all_1000 - ns/op 79919115 ns/op 50492483 ns/op 1.58
BenchmarkDocument/tree_delete_all_1000 - B/op 86990437 B/op 35687345 B/op 2.44
BenchmarkDocument/tree_delete_all_1000 - allocs/op 67752 allocs/op 51744 allocs/op 1.31
BenchmarkDocument/tree_edit_gc_100 - ns/op 3855096 ns/op 2674319 ns/op 1.44
BenchmarkDocument/tree_edit_gc_100 - B/op 4120989 B/op 2099522 B/op 1.96
BenchmarkDocument/tree_edit_gc_100 - allocs/op 14356 allocs/op 11165 allocs/op 1.29
BenchmarkDocument/tree_edit_gc_1000 - ns/op 327620521 ns/op 200656697 ns/op 1.63
BenchmarkDocument/tree_edit_gc_1000 - B/op 383468834 B/op 180293307 B/op 2.13
BenchmarkDocument/tree_edit_gc_1000 - allocs/op 145425 allocs/op 113350 allocs/op 1.28
BenchmarkDocument/tree_split_gc_100 - ns/op 2663794 ns/op 1969140 ns/op 1.35
BenchmarkDocument/tree_split_gc_100 - B/op 2386852 B/op 1363475 B/op 1.75
BenchmarkDocument/tree_split_gc_100 - allocs/op 10341 allocs/op 8735 allocs/op 1.18
BenchmarkDocument/tree_split_gc_1000 - ns/op 195475330 ns/op 133034523 ns/op 1.47
BenchmarkDocument/tree_split_gc_1000 - B/op 221990714 B/op 120284053 B/op 1.85
BenchmarkDocument/tree_split_gc_1000 - allocs/op 112254 allocs/op 96193 allocs/op 1.17
BenchmarkRPC/client_to_server - ns/op 365730827 ns/op 356375965 ns/op 1.03
BenchmarkRPC/client_to_server - B/op 16392277 B/op 16323573 B/op 1.00
BenchmarkRPC/client_to_server - allocs/op 166911 allocs/op 165420 allocs/op 1.01
BenchmarkRPC/client_to_client_via_server - ns/op 619327906 ns/op 607723810 ns/op 1.02
BenchmarkRPC/client_to_client_via_server - B/op 33212956 B/op 34041892 B/op 0.98
BenchmarkRPC/client_to_client_via_server - allocs/op 312116 allocs/op 309871 allocs/op 1.01
BenchmarkRPC/attach_large_document - ns/op 1178312668 ns/op 1463602622 ns/op 0.81
BenchmarkRPC/attach_large_document - B/op 1878726200 B/op 1878647264 B/op 1.00
BenchmarkRPC/attach_large_document - allocs/op 7545 allocs/op 7043 allocs/op 1.07
BenchmarkRPC/adminCli_to_server - ns/op 550865726 ns/op 541741676 ns/op 1.02
BenchmarkRPC/adminCli_to_server - B/op 36815336 B/op 36380716 B/op 1.01
BenchmarkRPC/adminCli_to_server - allocs/op 290166 allocs/op 284616 allocs/op 1.02
BenchmarkLocker - ns/op 64.8 ns/op 65.29 ns/op 0.99
BenchmarkLocker - B/op 16 B/op 16 B/op 1
BenchmarkLocker - allocs/op 1 allocs/op 1 allocs/op 1
BenchmarkLockerParallel - ns/op 38.98 ns/op 38.64 ns/op 1.01
BenchmarkLockerParallel - B/op 0 B/op 0 B/op NaN
BenchmarkLockerParallel - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkLockerMoreKeys - ns/op 145.5 ns/op 138.5 ns/op 1.05
BenchmarkLockerMoreKeys - B/op 15 B/op 15 B/op 1
BenchmarkLockerMoreKeys - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkChange/Push_10_Changes - ns/op 3835458 ns/op 3779429 ns/op 1.01
BenchmarkChange/Push_10_Changes - B/op 125674 B/op 126275 B/op 1.00
BenchmarkChange/Push_10_Changes - allocs/op 1254 allocs/op 1254 allocs/op 1
BenchmarkChange/Push_100_Changes - ns/op 14289532 ns/op 14129092 ns/op 1.01
BenchmarkChange/Push_100_Changes - B/op 649234 B/op 646942 B/op 1.00
BenchmarkChange/Push_100_Changes - allocs/op 6538 allocs/op 6540 allocs/op 1.00
BenchmarkChange/Push_1000_Changes - ns/op 115792914 ns/op 113213707 ns/op 1.02
BenchmarkChange/Push_1000_Changes - B/op 6053491 B/op 6011043 B/op 1.01
BenchmarkChange/Push_1000_Changes - allocs/op 62157 allocs/op 62155 allocs/op 1.00
BenchmarkChange/Pull_10_Changes - ns/op 2886505 ns/op 2837624 ns/op 1.02
BenchmarkChange/Pull_10_Changes - B/op 100355 B/op 100327 B/op 1.00
BenchmarkChange/Pull_10_Changes - allocs/op 952 allocs/op 951 allocs/op 1.00
BenchmarkChange/Pull_100_Changes - ns/op 4364190 ns/op 4303014 ns/op 1.01
BenchmarkChange/Pull_100_Changes - B/op 257255 B/op 257269 B/op 1.00
BenchmarkChange/Pull_100_Changes - allocs/op 3154 allocs/op 3154 allocs/op 1
BenchmarkChange/Pull_1000_Changes - ns/op 8548841 ns/op 8473189 ns/op 1.01
BenchmarkChange/Pull_1000_Changes - B/op 1393551 B/op 1393414 B/op 1.00
BenchmarkChange/Pull_1000_Changes - allocs/op 26870 allocs/op 26869 allocs/op 1.00
BenchmarkSnapshot/Push_3KB_snapshot - ns/op 17403929 ns/op 16717315 ns/op 1.04
BenchmarkSnapshot/Push_3KB_snapshot - B/op 799994 B/op 807884 B/op 0.99
BenchmarkSnapshot/Push_3KB_snapshot - allocs/op 6543 allocs/op 6541 allocs/op 1.00
BenchmarkSnapshot/Push_30KB_snapshot - ns/op 119487759 ns/op 117501595 ns/op 1.02
BenchmarkSnapshot/Push_30KB_snapshot - B/op 6177537 B/op 6250940 B/op 0.99
BenchmarkSnapshot/Push_30KB_snapshot - allocs/op 62158 allocs/op 62161 allocs/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - ns/op 6533311 ns/op 6521588 ns/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - B/op 903921 B/op 904310 B/op 1.00
BenchmarkSnapshot/Pull_3KB_snapshot - allocs/op 14876 allocs/op 14878 allocs/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - ns/op 14744045 ns/op 15228711 ns/op 0.97
BenchmarkSnapshot/Pull_30KB_snapshot - B/op 6976180 B/op 6983077 B/op 1.00
BenchmarkSnapshot/Pull_30KB_snapshot - allocs/op 144139 allocs/op 144141 allocs/op 1.00
BenchmarkSync/memory_sync_10_test - ns/op 6910 ns/op 6917 ns/op 1.00
BenchmarkSync/memory_sync_10_test - B/op 1286 B/op 1286 B/op 1
BenchmarkSync/memory_sync_10_test - allocs/op 38 allocs/op 38 allocs/op 1
BenchmarkSync/memory_sync_100_test - ns/op 52513 ns/op 51493 ns/op 1.02
BenchmarkSync/memory_sync_100_test - B/op 8652 B/op 8650 B/op 1.00
BenchmarkSync/memory_sync_100_test - allocs/op 273 allocs/op 273 allocs/op 1
BenchmarkSync/memory_sync_1000_test - ns/op 606756 ns/op 598451 ns/op 1.01
BenchmarkSync/memory_sync_1000_test - B/op 74380 B/op 74330 B/op 1.00
BenchmarkSync/memory_sync_1000_test - allocs/op 2109 allocs/op 2108 allocs/op 1.00
BenchmarkSync/memory_sync_10000_test - ns/op 7590003 ns/op 7141413 ns/op 1.06
BenchmarkSync/memory_sync_10000_test - B/op 769583 B/op 761330 B/op 1.01
BenchmarkSync/memory_sync_10000_test - allocs/op 20705 allocs/op 20560 allocs/op 1.01
BenchmarkTextEditing - ns/op 19385936586 ns/op 19117165431 ns/op 1.01
BenchmarkTextEditing - B/op 9038436768 B/op 9037584392 B/op 1.00
BenchmarkTextEditing - allocs/op 19922544 allocs/op 19921383 allocs/op 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.