当前位置:首页>python>在 Python 或 C++ 中实现 NVIDIA TensorRT 长耗时引擎构建的可观测与取消

在 Python 或 C++ 中实现 NVIDIA TensorRT 长耗时引擎构建的可观测与取消

  • 2026-08-18 23:11:14
在 Python 或 C++ 中实现 NVIDIA TensorRT 长耗时引擎构建的可观测与取消

内容提要

背景与挑战

NVIDIA TensorRT 引擎构建过程往往耗时较长,缺乏实时反馈会导致资源浪费甚至会话卡死。为解决这一痛点,TensorRT 提供了 IProgressMonitor API,允许开发者在 Python 或 C++ 中实现细粒度、线程安全的进度监控与取消功能。

核心实现机制

开发者需继承抽象基类并重写三个关键方法:phase_startstep_complete 和 phase_finish。其中,step_complete 是唯一能触发构建取消的回调函数,通过返回布尔值决定是否继续执行。由于 TensorRT 内部使用多线程调用监控器,必须使用锁(Lock)或原子变量保护状态,以避免渲染撕裂或数据竞争。

关键行为约束

需注意以下行为细节:phase_start 不支持即时取消,请求需在步骤边界生效;phase_finish 可能提前触发,应视为权威结束信号而非进度完成的依据。此外,避免将标准输出重定向至文件,以免日志不可读。

应用场景

该接口可作为构建器与应用层的单一集成边界,广泛适用于 IDE 扩展、FastAPI HTTP 服务及 Agent 工具调用等场景,通过统一接口实现进度上报与优雅退出,显著提升开发体验与系统稳定性。

在 Python 或 C++ 中使长期运行的 NVIDIA TensorRT 引擎构建过程可观测且可取消

2026年7月22日

  • IProgressMonitor(在 NVIDIA TensorRT 中已提供数个版本)支持细粒度、线程安全的进度追踪和引擎构建期间的取消操作,这对于管理漫长的构建时间和避免浪费 GPU 计算资源至关重要。
  • 该 API 要求在 Python 和 C++ 中重写三个方法(phase_start、step_complete、phase_finish),以追踪嵌套的构建阶段、更新进度,并在步骤边界处处理取消请求,确保对用户中断或程序化停止信号的响应能力。
  • 集成 IProgressMonitor 允许将实时进度报告发送至终端、IDE、HTTP 服务或代理运行时,并将构建逻辑与应用层面的渲染或流式传输解耦,同时需要谨慎处理线程安全、stdout 重定向、取消延迟以及过早阶段终止等边缘情况。

TensorRT 引擎构建可能需要几秒到几十分钟不等。大型强类型模型、深度战术搜索以及全新 GPU SKU 上的冷启动计时缓存,可能导致开发者、最终用户或 AI 代理面对一个冻结的终端,却不知道该等待、重试还是终止进程。大多数 NVIDIA TensorRT 集成在构建期间不提供任何报告,或无法提前中止。在长时间运行的代理工作流中,这会导致 GPU 工时浪费和会话卡死。

_图 1. 由 IProgressMonitor 子类渲染的 TensorRT 引擎构建的实时嵌套进度条_

TensorRT 提供了 IProgressMonitor API 来解决此问题,该接口已在 NvInfer.h 中存在数个版本。本教程将逐步演示 Python 和 C++ 的最小化即插即用实现,添加响应 Ctrl-C 或来自外部事件循环的程序化停止信号的取消路径,并展示如何将生成的进度流暴露给 IDE、服务或代理运行时使用。

本文中的每个代码块均提取自或基于两个 NVIDIA 维护的开源示例:

  • Python:
     samples/python/simple_progress_monitor/ (ResNet-50,强类型网络)
  • C++:
     samples/sampleProgressMonitor/ (MNIST)

IProgressMonitor 提供什么

IProgressMonitor 是一个抽象基类,TensorRT 在引擎构建期间会调用它。您只需子类化并重写三个方法。其结构在 Python 和 C++ 中完全相同,仅拼写不同。

| 概念 | Python 方法 | C++ 方法 | 操作内容 |

| 进入阶段 | phase_start(phase_name, parent_phase, num_steps) | phaseStart(phaseName, parentPhase, nbSteps) | 预留进度行并记录 num_steps 。 |

| 阶段内步骤完成 | step_complete(phase_name, step) -> bool | stepComplete(phaseName, step) -> bool | 推进进度条。返回 False / false 以取消构建。 |

| 退出阶段 | phase_finish(phase_name) | phaseFinish(phaseName) | 销毁该行。 |

_表 1. IProgressMonitor 接口在 Python 和 C++ 中的镜像。这三个方法具有相同的语义,且 step_complete 是唯一返回值会影响构建器行为的回调_

父阶段(parent_phase)非空的阶段嵌套在另一个阶段内部,因此监视器看到的是进度树而非扁平列表。该实现必须是线程安全的,因为 TensorRT 可以从多个内部线程调用同一个监视器实例。

通过将监视器连接到构建器,即在 IBuilderConfig 上设置它。这在两种语言中都只需一次调用:

config.progress_monitor = MyMonitor() # Python

config->setProgressMonitor(&myMonitor); // C++

_图 2. TensorRT 在构建期间驱动的回调序列,其中红色高亮显示了取消路径_

从上到下阅读该图表。构建器以 phase_start 打开“构建引擎”阶段,然后在其内部打开“战术选择”阶段,其 parent_phase 指回“构建引擎”。随着构建的进行,构建器调用 step_complete(实线箭头),而你的监视器返回一个布尔值(虚线箭头):true 让构建继续,false 请求取消。在此显示的运行中,监视器在第 47 步返回 false,即红色取消路径,构建器停止发出新步骤并展开栈帧。它在“战术选择”上提前调用 phase_finish,然后在“构建引擎”上调用,按相反顺序关闭所有活动阶段。

本教程构建的内容

本教程展示了如何在 Python 和 C++ 中实现 IProgressMonitor,通过 step_complete 添加取消功能,并将进度更新路由到终端、IDE、服务或代理运行时。

先决条件

  • 一块 NVIDIA GPU。
  • TensorRT(当前开源版本)及其 Python 绑定,或 C++ 示例的构建。
  • Python 3.10 或更高版本(Python 路径)。
  • TensorRT 示例数据:用于 Python 的 ResNet-50 ONNX 和用于 C++ 的 MNIST ONNX。两者都随 sample-data 归档文件提供,或在官方 NGC 容器下挂载于 /usr/src/tensorrt/data。
  • 支持 ANSI 虚拟终端转义序列的终端。任何现代 Linux shell 均符合要求;如果启用了 VT,Windows Terminal 也可用。

1. 在 Python 中对 IProgressMonitor 进行子类化

该类很小。它仅跟踪哪些阶段处于活动状态以及每个阶段包含多少步骤。

import tensorrt as trt

from dataclasses import dataclass, field

from threading import Lock

@dataclass

class _PhaseState:

num_steps: int

current_step: int = 0

parent: str | None = None

class RichProgressMonitor(trt.IProgressMonitor):

def init(self):

super().init()

self._lock = Lock()

self._phases: dict[str, _PhaseState] = {}

self._cancelled = False

self._rendered_lines = 0

def phase_start(self, phase_name, parent_phase, num_steps):

with self._lock:

self._phases[phase_name] = _PhaseState(

num_steps=num_steps, parent=parent_phase

)

self._render()

def step_complete(self, phase_name, step) -> bool:

with self._lock:

if phase_name in self._phases:

self._phases[phase_name].current_step = step

self._render()

return not self._cancelled

def phase_finish(self, phase_name):

with self._lock:

self._phases.pop(phase_name, None)

self._render()

有两点需要注意。首先,Lock(锁)不是可选的。TensorRT会从多个内部线程调用监控器,如果由不拥有状态的线程进行渲染,会导致显示撕裂。其次,step_complete是唯一可以停止构建的回调函数。phase_start返回None,因此你不能在阶段开始之前拒绝它。最早的取消点是该阶段的第一个step_complete。

2. 使用虚拟终端转义序列渲染嵌套进度条

渲染器是随环境变化最大的部分,因此本节给出形状示例,并指向生产级实现的上游样本。模式如下:

def _render(self):

按嵌套深度对阶段排序,以便子阶段绘制在父阶段下方。

rows = sorted(

self._phases.items(),

key=lambda kv: (kv[1].parent or "", kv[0]),

)

光标向上移动的行数应等于上一次渲染打印的行数,

而不是当前行数——阶段在嵌套时添加,在phase_finish时移除,

因此当树结构改变时,两者恰好不同。

if self._rendered_lines:

print(f"\x1b[{self._rendered_lines}A", end="")

for name, st in rows:

step是[0, num_steps)中的基于0的索引;+1将其转换为

完成计数,以便进度条实际上可以达到100%。

done = min(st.current_step + 1, st.num_steps)

pct = done / max(st.num_steps, 1)

bar = "█" * int(40 * pct) + "·" * (40 - int(40 * pct))

indent = " " if st.parent else ""

print(f"\x1b[2K{indent}{name:<28} [{bar}] {done}/{st.num_steps}")

清除阶段完成且数量减少后留下的行。

for _ in range(self._rendered_lines - len(rows)):

print("\x1b[2K")

self._rendered_lines = len(rows)

上游的simple_progress_monitor.py以改进的颜色和宽度处理渲染相同的形状。转义序列\x1b[NA将光标向上移动_N_行,而\x1b[2K清除一行。第一次渲染调用写入空白行;后续调用就地覆盖它们。

当附加此监控器时,请勿将stdout重定向到文件或管道。转义码将被原样写入日志,使其无法阅读。对于非终端接收器,请用结构化发射器替换_render()。

3. 添加取消路径

一旦监控器存在,取消功能只需三行代码即可添加。安装一个翻转标志的 SIGINT 处理器,然后让 step_complete 尊重该标志。

import signal

def install_cancel(monitor: RichProgressMonitor):

def handler(signum, frame):

monitor._cancelled = True

print("\nCancelling TensorRT build at next step boundary...")

signal.signal(signal.SIGINT, handler)

连接监控器并运行构建器:

builder = trt.Builder(TRT_LOGGER)

network = builder.create_network(

1 << int(trt.NetworkDefinitionCreationFlag.STRONGLY_TYPED)

)

parser = trt.OnnxParser(network, TRT_LOGGER)

with open(onnx_path, "rb") as f:

parser.parse(f.read())

config = builder.create_builder_config()

monitor = RichProgressMonitor()

config.progress_monitor = monitor

install_cancel(monitor)

serialized = builder.build_serialized_network(network, config)

if serialized is None:

if monitor._cancelled:

print("Build cancelled cleanly.")

else:

print("Build failed.")

build_serialized_network() 在取消时返回 None。构建器会在下一个步骤边界展开,通常很快,但并非瞬时,特别是在长时间的战术搜索步骤内。

应用程序应向用户展示取消延迟。在展开窗口期间一个简单的“正在取消…”消息能极大改善体验。

同一标志也可以从任何非信号路径设置,例如 IDE 停止按钮、代理超时或 CI 取消 Webhook。设置 monitor._cancelled = True,构建将在下一个步骤边界中止。

4. C++ 中的相同模式

include <NvInfer.h>

include <atomic>

include <mutex>

include <unordered_map>

class RichProgressMonitor : public nvinfer1::IProgressMonitor {

public:

void phaseStart(char const* phaseName,

char const* parentPhase,

int32_t nbSteps) noexcept override {

std::lock_guard<std::mutex> g(mu_);

phases_[phaseName] = {nbSteps, 0, parentPhase ? parentPhase : ""};

render();

}

bool stepComplete(char const* phaseName,

int32_t step) noexcept override {

std::lock_guard<std::mutex> g(mu_);

auto it = phases_.find(phaseName);

if (it != phases_.end())

it->second.current = step;

render();

return !cancelled_.load();

}

void phaseFinish(char const* phaseName) noexcept override {

std::lock_guard<std::mutex> g(mu_);

phases_.erase(phaseName);

render();

}

void requestCancel() noexcept {

cancelled_.store(true);

}

private:

struct Phase {

int32_t nbSteps;

int32_t current;

std::string parent;

};

std::mutex mu_;

std::unordered_map<std::string, Phase> phases_;

std::atomic<bool> cancelled_{false};

void render() noexcept;

};

以相同方式附加:

auto config =

std::unique_ptr<nvinfer1::IBuilderConfig>(

builder->createBuilderConfig());

RichProgressMonitor monitor;

config->setProgressMonitor(&monitor);

用于取消标志的 std::atomic<bool> 很重要,因为 requestCancel() 可能从另一个线程或信号处理器中调用。其余部分与 Python 版本镜像一致。

在真实系统中何处接入

_图 3. IProgressMonitor 是构建器与应用界面之间的单一集成点_

取消箭头是从代理运行时绘制的,为了具体说明,但相同的机制适用于每个接收端。来自终端的 Ctrl-C、IDE 停止按钮、HTTP 取消 Webhook 或代理超时都会翻转相同的 monitor._cancelled 标志,取消将在下一个 step_complete 返回时生效。在真实系统中何处接入

终端是简单的情况。有趣的集成将进度路由到其他地方:

  • IDE 扩展:
     重写 _render() 以在语言服务器协议中发出 $/progress 通知,或在协议中使用等效的 window/showProgress。每个阶段成为一个进度令牌;step_complete() 成为报告消息;phase_finish() 成为结束。
  • FastAPI / HTTP 服务:
     在后台线程上运行构建,并让 _render() 将条目推入 asyncio.Queue,请求处理程序通过服务器发送事件(Server-Sent Events)从中排空。客户端获得实时流;取消钩子只是一个 POST /builds/{id}/cancel,它调用 monitor.requestCancel() 。
  • Agent 工具调用:
     在每个阶段转换时发出一个结构化块( {"phase": ..., "step": ..., "total": ...} )进入工具调用流。代理运行时将其渲染在用户可见的跟踪中,相同的 requestCancel() 钩子是当构建超出预算时代理超时会调用的内容。此模式对代理运行时也很重要。长时间运行的构建需要可观察且可取消,以便代理可以报告进度、强制执行时间预算并干净地停止。

在所有这三种情况下,IProgressMonitor 都是正确的边界。高于它的任何内容(渲染、流式传输、传输)都是应用程序级别的;低于它的任何内容(策略计时、内核选择)都是构建器的事务。

需要处理的边缘情况

这些行为是常见的集成错误来源:

  • 不要在附加终端渲染器时重定向 stdout。转义序列会污染日志。对于非交互式接收端,将渲染器交换为结构化发射器。
  • phase_start() 无法取消。它返回 None。最早的取消点是该阶段的第一个 step_complete()。如果用户在漫长的 phase_start() 期间取消,构建将继续进行直到第一个步骤边界。
  • phase_finish() 可能在报告所有 num_steps 之前触发。这可能发生在错误恢复、构建器内部短路或 step_complete() 返回 False 时。将其视为权威的阶段结束信号;不要假设 current_step == num_steps。
  • 取消延迟是有界的,但不为零。构建器在检查返回值之前会完成当前步骤。漫长的战术搜索步骤可能会将此延迟推至几秒到几十秒的范围。
  • 需要线程安全。同一个 monitor 实例从多个构建器线程调用;来自 _render() 的未仪器化 dict 或 unordered_map 访问最终会导致崩溃或数据撕裂。

文章来源:NVIDIA Developer Blog

原文链接:https://developer.nvidia.com/blog/make-long-running-nvidia-tensorrt-engine-builds-observable-and-cancelable-in-python-or-c

本文为公开资料的中文翻译与摘要解读,具体信息以文末原文为准。

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-08-21 15:43:01 HTTP/2.0 GET : https://f.mffb.com.cn/a/506499.html
  2. 运行时间 : 0.407437s [ 吞吐率:2.45req/s ] 内存消耗:4,604.59kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=6336ee47b9f207ed8daab2881a3774ea
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000911s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.001246s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.026610s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000592s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.001174s ]
  6. SELECT * FROM `set` [ RunTime:0.008392s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.001659s ]
  8. SELECT * FROM `article` WHERE `id` = 506499 LIMIT 1 [ RunTime:0.046919s ]
  9. UPDATE `article` SET `lasttime` = 1787298181 WHERE `id` = 506499 [ RunTime:0.005641s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000579s ]
  11. SELECT * FROM `article` WHERE `id` < 506499 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000893s ]
  12. SELECT * FROM `article` WHERE `id` > 506499 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.031352s ]
  13. SELECT * FROM `article` WHERE `id` < 506499 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.003421s ]
  14. SELECT * FROM `article` WHERE `id` < 506499 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.027637s ]
  15. SELECT * FROM `article` WHERE `id` < 506499 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.070835s ]
0.409058s