feat(spi): 增强 SPI master:性能剖析与执行耗时跟踪
- 新增 `lastWorkerExecUs()`:获取最近一次 worker 任务执行耗时(µs)。 - 引入 `SpiProfile` 结构体:事务级详细剖析,记录 SPI 事务各阶段的时间戳。 - 实现 `lastProfile()`:诊断用,获取最近一次事务剖析快照。 - SPI 时钟配置提升至 13.3 MHz,改善性能。 - 修改前端 JavaScript 轮询逻辑:新增 uptime 检查,更好地处理 ESP32 重启状态。 - SPI 测速 HTML 的计时单位由毫秒改为微秒显示。 - 新建 `spi_ring_cache.h`:共享 SPI ring push 缓存工具。 - 新增 `http_util.h`:共享 HTTP 处理器工具,含 JSON 拼接与查询参数解析。 - 引入 `json_parse.h`:轻量级 JSON 解析器,针对扁平 JSON 对象设计。 - 新增 Windows 环境下的项目构建批处理脚本。 - 重构 CAN 反馈处理:从推送式改为请求驱动架构,降低内存占用、提升效率。
This commit is contained in:
+3
-3
@@ -113,15 +113,15 @@
|
||||
function addHistory(frames, payload, text) {
|
||||
/* 从设备中文文本里提取关键数字做历史行 */
|
||||
var fail = (text.match(/失败:\s*(\d+)/) || [])[1] || "?";
|
||||
var avg = (text.match(/平均\s*([\d.]+)\s*ms/) || [])[1] || "?";
|
||||
var min = (text.match(/最快\s*([\d.]+)\s*ms/) || [])[1] || "?";
|
||||
var avg = (text.match(/平均\s*([\d.]+)\s*µs/) || [])[1] || "?";
|
||||
var min = (text.match(/最快\s*([\d.]+)\s*µs/) || [])[1] || "?";
|
||||
var tput = (text.match(/等效吞吐:\s*([\d.]+)\s*KB\/s/) || [])[1] || "-";
|
||||
var d = new Date();
|
||||
var tr = document.createElement("tr");
|
||||
var cells = [
|
||||
pad2(d.getHours()) + ":" + pad2(d.getMinutes()) + ":" + pad2(d.getSeconds()),
|
||||
String(frames), String(payload) + "B", fail,
|
||||
avg + "ms", min + "ms", tput === "-" ? "-" : tput + "KB/s"
|
||||
avg + "µs", min + "µs", tput === "-" ? "-" : tput + "KB/s"
|
||||
];
|
||||
for (var i = 0; i < cells.length; i++) {
|
||||
var td = document.createElement("td");
|
||||
|
||||
Reference in New Issue
Block a user