<?php

/**
 * Index.php
 * 文件描述
 * Created On 2022/1/26
 * @author yuanb yuanbo0x@gmail.com
 */

namespace Test;

use Game\Constant\TestParams;

require_once __DIR__ . '/../Library/AutoLoad.php';


$testObj = new TestParams();
$testObj::$startTime = microtime(true);

$modelType = $_GET['t'];

if (!isset($_GET['zone'])) {
    echo "Zone Error";
    return;
}
$zone = $_GET['zone'];

/**
 * @var TestBase $model
 */
$model = TestConfig::createTest($modelType);
if ($model == null) {
    die("test fail model type not find");
}
$model->index($zone);

$testObj::$endTime = microtime(true);
$testObj->writeLogInfo();

echo "test finish";
