mirror of
https://github.com/Darkatse/TauriTavern.git
synced 2026-11-03 20:30:26 +00:00
The frontend suite answers host calls from a fixture, so file reads, card parsing and tokenizing never reached its counters. It now records each call with its step and writes the calls, with the dataset laid out as a data root, to tests/perf/out/. tt-perf (the perf feature) builds AppState on Tauri's mock runtime from its own HostEnvironment and replays the calls through the real commands, taking the values the host issued from its own results. Each step counts result bytes, plus callgrind instructions and /proc/self/io on Linux, retired instructions on macOS and I/O counters on Windows. LlmApiLogStore and the two Webview commands the replay reaches become generic over the runtime. Linux compares with a committed baseline built with the Rust release it names, so a new stable cannot move it. macOS and Windows counts depend on the machine, so uncommitted source changes are compared with HEAD measured in a worktree on the same machine, taking the least of three runs. The replay runs on one async worker and one blocking thread: tokenizing on a pool thread with a cold per-thread cache made a third of runs 18M instructions shorter. macOS logical writes varied by 30% and are not counted. Reverting the name-only chat listing grows open-back's result bytes by 47%, which the frontend counters missed. The Linux baseline comes from the first CI run, whose log ends with the counters to commit. |
||
|---|---|---|
| .. | ||
| BootstrapOptimization.md | ||
| CharacterIdentityContract.md | ||
| ChatPayload.md | ||
| DataDirectorySelection.md | ||
| EmbeddedRuntime.md | ||
| FileTransfer.md | ||
| FirstPartyUI.md | ||
| HostResourceCaching.md | ||
| InAppAssistant.md | ||
| iOSPolicy.md | ||
| LinuxRepository.md | ||
| LoggingObservability.md | ||
| MCP.md | ||
| MediaAssetContract.md | ||
| MemoryExtensionApi.md | ||
| MobileStyleAdaptation.md | ||
| NativeApiFormats.md | ||
| PerfBaseline.md | ||
| README.md | ||
| StartupOptimization.md | ||
| Sync.md | ||
| ThirdPartyExtensions.md | ||
| TTS.md | ||
| UpdateChannels.md | ||
| UserEndpointAccess.md | ||
| VectorApi.md | ||
| WebHost.md | ||
| WindowsDistribution.md | ||
模块文档
这里记录各模块的工作方式与源码入口。Agent 的整体说明集中在 Agent,后端分层见 后端结构。
| 模块 | 文档内容 |
|---|---|
| 第三方扩展 | 加载、发现与资源访问 |
| 移动端视口 | 原生内容视口、窗口背景与第一方移动端行为 |
| 消息内嵌运行时 | iframe 的生命周期与渲染 |
| 启动流程 | Shell、Core、Full 阶段 |
| Bootstrap | 启动输入与内存开销 |
| 聊天存储 | 完整历史、分页读取和保存 |
| 记忆扩展 | 聊天查询与扩展存储 |
| 媒体资源 | 浏览器资源与 Range 请求 |
| 系统 TTS | Android Web Speech 接入与当前边界 |
| 同步 | LAN Sync 与 TT-Sync |
| 文件传输 | 原生选取、交付与暂存 |
| 数据目录 | 桌面目录选择与迁移 |
| 原生模型 API | Responses、Claude、Gemini 等格式 |
| iOS 策略 | 平台能力与分发设置 |
| 角色身份 | 角色、聊天目录、重命名与世界书绑定 |
| 日志 | tracing、Dev API 与 LLM 请求日志 |
| 资源缓存 | 资源版本与条件请求 |
| 更新渠道 | Stable、Canary 与更新检测 |
| Linux 分发 | APT、RPM 与 Nix |
| Windows 分发 | WinGet 与安装包 |
| MCP | 服务器、工具目录与模型调用 |
| 向量 API | 索引、embedding 与查询 |
| 自有界面 | React、TypeScript 与构建流程 |
| Web Host | 浏览器嵌入方(Tavern Studio)使用的宿主实现 |
| 性能基线 | 前后端工作量的计量、基线与新增场景 |