MCPcopy Create free account
hub / github.com/paypal/junodb / logStrOpCode

Method logStrOpCode

cmd/proxy/proc/base.go:960–975  ·  view source on GitHub ↗
(opcode proto.OpCode)

Source from the content-addressed store, hash-verified

958}
959
960func (p *ProcessorBase) logStrOpCode(opcode proto.OpCode) string {
961 ///xuli TODO do some tests to find out if the following is better than using simply fmt.Sprintf()
962 var b bytes.Buffer
963 if p.clientRequest.IsForReplication() {
964 b.WriteByte('R')
965 }
966 if opcode.IsForStorage() {
967 b.WriteString(p.clientRequest.GetOpCodeText())
968 b.WriteByte('.')
969 b.WriteString(opcode.String())
970 } else {
971 b.WriteString(opcode.String())
972 }
973
974 return b.String()
975}

Callers 4

sendMessageMethod · 0.95
handleSSTimeoutMethod · 0.95
writeBasicSSRequestInfoFunction · 0.80

Calls 7

WriteByteMethod · 0.95
WriteStringMethod · 0.95
StringMethod · 0.95
IsForStorageMethod · 0.80
GetOpCodeTextMethod · 0.80
IsForReplicationMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected