LoggingStrategy wraps another strategy and appends each non-trivial compaction (before / after) to a file. Use it to inspect strategies and compare them side-by-side without touching their implementations.
| 13 | // compaction (before / after) to a file. Use it to inspect strategies and |
| 14 | // compare them side-by-side without touching their implementations. |
| 15 | type LoggingStrategy struct { |
| 16 | Inner CompactionStrategy |
| 17 | FilePath string |
| 18 | } |
| 19 | |
| 20 | // WithLogging is sugar for &LoggingStrategy{Inner: inner, FilePath: path}. |
| 21 | func WithLogging(inner CompactionStrategy, path string) *LoggingStrategy { |
nothing calls this directly
no outgoing calls
no test coverage detected