/**
  *
  */
 public function test()
 {
     if (extension_loaded('xdebug')) {
         $this->assertTrue(true);
         return;
     }
     $gameVersion = 'tw';
     $pool = PdoFactory::makePool($gameVersion);
     $provider = new InstallUidProvider($gameVersion, $pool);
     $groupedUidList = array_filter($provider->generate(date('Y-m-d')));
     foreach ($groupedUidList as $shardId => $uidList) {
         static::assertStringStartsWith('db', $shardId);
         static::assertTrue(is_array($uidList));
         static::assertEquals(range(0, count($uidList) - 1), array_keys($uidList));
     }
 }
        mkdir($dir, 0755, true);
    }
    return $filePath;
};
$fromDate = date_create_from_format('Ymd', $fromDay);
if (!$fromDate instanceof \DateTime) {
    appendLog(sprintf('from [%s] not valid', $fromDay));
    return;
}
$toDate = date_create_from_format('Ymd', $toDay);
if (!$toDate instanceof \DateTime) {
    appendLog(sprintf('to [%s] not valid', $toDay));
    return;
}
$pdoPool = PdoFactory::makePool($gameVersion);
$installUidProvider = new InstallUidProvider($gameVersion, $pdoPool);
$userDetailProvider = new UserDetailProvider($gameVersion, $pdoPool);
$magicNumber = isset($options['magic']) ? (int) $options['magic'] : 500;
assert($magicNumber > 10);
$indexer = IndexerFactory::make(ELASTIC_SEARCH_HOST, $gameVersion, $magicNumber);
if ($verbose) {
    dump(sprintf('version: %s, from: %s, to: %s, safe: %d, magic: %d', $gameVersion, $fromDay, $toDay, $safeRound, $magicNumber));
}
$calendarDayGenerator = CalendarDayGenerator::generate($fromDate->getTimestamp(), $toDate->getTimestamp());
$totalUser = 0;
$processedRound = 0;
foreach ($calendarDayGenerator as $calendarDay) {
    $markerDate = new DateTimeImmutable($calendarDay);
    if ($calendarMarker->isMarked($markerDate)) {
        appendLog('bypass ' . $markerDate->format('Y-m-d'));
        continue;