(opcode proto.OpCode)
| 958 | } |
| 959 | |
| 960 | func (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 | } |
no test coverage detected