src/Trace.php
private static function baseInfo()
    {

        $dbConfig = config('dbConfig', 'db');
        $dbName   = '';
        foreach ($dbConfig as $key => $value) {
            !isset($value['host']) ?: $dbName .= $value['host'] . ' : ';
            !isset($value['name']) ?: $dbName .= $value['name'] . '  / ';
        }

        $base = [
            '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'] . ' : ' . strip_tags($_SERVER['REQUEST_URI']),
            '运行时间' => number_format(microtime(true) - START_TIME, 6) . ' s',
            '吞吐率'    => number_format(1 / (microtime(true) - START_TIME), 2) . 'req/s',
            '内存开销' => number_format((memory_get_usage() - START_USE_MENUS) / 1024, 2) . ' kb',
            '文件加载' => count(get_included_files()),
            //'缓存信息' => n('cache_read') . ' gets ' . n('cache_write') . ' writes ',
            '配置加载' => count(config()),
            '会话信息' => 'SESSION_ID=' . session_id(),
            '数据库'    => $dbName,
            '磁盘信息' => number_format(DISK_TOTAL_SPACE / 1024 / 1024 / 1024, 3) . ' G (all) / ' . number_format((DISK_TOTAL_SPACE - DISK_FREE_SPACE) / 1024 / 1024 / 1024, 3) . ' G (use) / ' . number_format(DISK_FREE_SPACE / 1024 / 1024 / 1024, 3) . 'G (free)',
        ];

        return $base;
    }
private static function baseInfo()
    {

        $dbConfig = config('dbConfig', 'db');
        $dbName   = '';
        foreach ($dbConfig as $key => $value) {
            !isset($value['host']) ?: $dbName .= $value['host'] . ' : ';
            !isset($value['name']) ?: $dbName .= $value['name'] . '  / ';
        }

        $base = [
            '请求信息' => date('Y-m-d H:i:s', $_SERVER['REQUEST_TIME']) . ' ' . $_SERVER['SERVER_PROTOCOL'] . ' ' . $_SERVER['REQUEST_METHOD'] . ' : ' . strip_tags($_SERVER['REQUEST_URI']),
            '运行时间' => number_format(microtime(true) - START_TIME, 6) . ' s',
            '吞吐率'    => number_format(1 / (microtime(true) - START_TIME), 2) . 'req/s',
            '内存开销' => number_format((memory_get_usage() - START_USE_MENUS) / 1024, 2) . ' kb',
            '文件加载' => count(get_included_files()),
            //'缓存信息' => n('cache_read') . ' gets ' . n('cache_write') . ' writes ',
            '配置加载' => count(config()),
            '会话信息' => 'SESSION_ID=' . session_id(),
            '数据库'    => $dbName,
            '磁盘信息' => number_format(DISK_TOTAL_SPACE / 1024 / 1024 / 1024, 3) . ' G (all) / ' . number_format((DISK_TOTAL_SPACE - DISK_FREE_SPACE) / 1024 / 1024 / 1024, 3) . ' G (use) / ' . number_format(DISK_FREE_SPACE / 1024 / 1024 / 1024, 3) . 'G (free)',
        ];

        return $base;
    }
获取基本信息