Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LiveTPS

Legacy Script Engine (QuickJS) 插件:在 ActionBar 或聊天中显示服务端 TPS 与估算 MSPT

安装

  1. 服务端已安装 legacy-script-engine-quickjs(LegacyScriptEngine QuickJS 后端)。
  2. 将本目录整体复制到 plugins/LiveTPS/(需包含 manifest.jsonmain.jslib/)。QuickJS 入口 main.js 使用相对 BDS 工作目录 的 import 路径(见 LSE LanguageSupport 文档)。

命令

命令 说明
/tps 切换 ActionBar 实时显示(默认关);再次执行关闭
/tps <1-50> 在聊天中采样若干次(约每秒 1 次),前缀 [剩余次数],结束后输出平均 TPS / MSPT
控制台 tps 打印当前一行指标,不切换 ActionBar
控制台 tps <1-50> 在服务端日志中采样若干次(约每秒 1 次),前缀 [剩余次数],结束后输出平均 TPS / MSPT

示例:/tps 5 — 采样 5 次后显示平均值。

指标说明

LSE 未提供官方 TPS/MSPT API。本插件在 onTick 中用墙钟时间估算相邻 tick 间隔(MSPT,EMA 平滑),并用约 1 秒窗口统计 tick 数得到 TPS。数值供相对参考,与 BDS 内部 profiler 可能不一致。

License

SPDX-License-Identifier: GPL-3.0-or-later

Copyright (C) 2026 YUMU1658

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

About

LSE QuickJS 插件 — 实时显示 BDS 服务器 TPS/MSPT

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages