(op OperationType, tx *bolt.Tx, bucket []byte, key []byte, conf concurrentConfig)
| 422 | } |
| 423 | |
| 424 | func executeOperation(op OperationType, tx *bolt.Tx, bucket []byte, key []byte, conf concurrentConfig) (historyRecord, error) { |
| 425 | switch op { |
| 426 | case Read: |
| 427 | return executeRead(tx, bucket, key, conf.readInterval) |
| 428 | case Write: |
| 429 | return executeWrite(tx, bucket, key, conf.writeBytes, conf.noopWriteRatio) |
| 430 | case Delete: |
| 431 | return executeDelete(tx, bucket, key) |
| 432 | default: |
| 433 | panic(fmt.Sprintf("unexpected operation type: %s", op)) |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | func executeRead(tx *bolt.Tx, bucket []byte, key []byte, readInterval duration) (historyRecord, error) { |
| 438 | var rec historyRecord |
no test coverage detected