INNER CODE UNIT · C#
CreateStore
ZoneTree/ZoneTree · benchmarks/zonetree-scan-lab/Program.cs:97
static IScanStore CreateStore(ScanLabConfig config) =>
config.Engine switch
{
EngineKind.ZoneTree => new ZoneTreeScanStore(config),
EngineKind.RocksDb => new RocksDbScanStore(config),
_ => throw new ArgumentOutOfRangeException(nameof(config.Engine))
};
static string FormatCount(int count)
{
if (count % 1_000_000 == 0)
return $"{count / 1_000_000}M";
if (count % 1_000 == 0)
return $"{count / 1_000}K";
return count.ToString("N0");
}
interface IScanStore : IAsyncDisposable