INNER CODE UNIT · C#
HasData
ZoneTree/ZoneTree · benchmarks/zonetree-scan-lab/Program.cs:179
public bool HasData() =>
HasPersistedFiles(ProfilesPath) ||
HasPersistedFiles(CountryStatusPath) ||
HasPersistedFiles(CreatedAtPath) ||
HasPersistedFiles(ReputationPath);
public async Task InsertAsync(int profiles)
{
Console.Write("insert indexes... ");
var sw = Stopwatch.StartNew();
for (var id = 1; id <= profiles; id++)
{
var profile = Generator.Create(id);
Profiles!.Upsert(profile.UserId, ProfileCodec.Serialize(profile));
CountryStatusIndex!.Upsert(ProfileKeys.CountryStatus(profile), profile.UserId);
CreatedAtIndex!.Upsert(ProfileKeys.CreatedAt(profile), profile.UserId);
ReputationIndex!.Upsert(ProfileKeys.Reputation(profile), profile.UserId);
}