Files
dolt/chunks/memory_root_tracker.go
Chris Masone a22b9de144 Changes to xml_importer.go to allow for naive benchmarking
Introduce the 'NopStore', which is a sorta-ChunkStore that throws away
all written data. Get() can't really be called on it, as a result,
but it's useful for taking IO totally out of the equation when testing
our code for performance.

Towards issue #67
2015-07-20 10:08:00 -07:00

19 lines
324 B
Go

package chunks
import "github.com/attic-labs/noms/ref"
type memoryRootTracker ref.Ref
func (ms *memoryRootTracker) Root() ref.Ref {
return ref.Ref(*ms)
}
func (ms *memoryRootTracker) UpdateRoot(current, last ref.Ref) bool {
if last != ref.Ref(*ms) {
return false
}
*ms = memoryRootTracker(current)
return true
}