mirror of
https://github.com/layue13/MoonBridge.git
synced 2026-10-26 19:03:49 +00:00
发行包去掉 bin/ 启动脚本和 lib/ 下的 42 个依赖 jar,改为与其他代理服务端一样 用 java -jar moonbridge.jar 启动: - proxy-core 用 shadow 打出含全部依赖的 moonbridge.jar(合并 META-INF/services, 清单写入 Main-Class、Multi-Release 与 Enable-Native-Access: ALL-UNNAMED) - 泄漏检测默认关闭改由 ProxyMain 在加载 Netty 前设置,显式 -D 仍优先 - 移除不再使用的 application 约定插件 - 安装包检查、烟测与基准脚本改用发行包根目录作 classpath;文档同步 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.1 KiB
PowerShell
31 lines
1.1 KiB
PowerShell
param(
|
|
[int]$Connections = 4,
|
|
[int]$Messages = 1000,
|
|
[int]$Warmup = 100,
|
|
[int]$Payload = 1024,
|
|
[int]$Repeats = 2,
|
|
[int]$Window = 1
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
$installLib = Join-Path $repoRoot "proxy\core\build\install\moonbridge"
|
|
$classes = Join-Path $PSScriptRoot "build"
|
|
|
|
Push-Location $repoRoot
|
|
try {
|
|
& .\gradlew.bat :proxy-core:installDist
|
|
if ($LASTEXITCODE -ne 0) { throw "installDist failed with exit code $LASTEXITCODE" }
|
|
|
|
New-Item -ItemType Directory -Path $classes -Force | Out-Null
|
|
& javac -cp "$installLib\*" -d $classes (Join-Path $PSScriptRoot "RelayBenchmark.java")
|
|
if ($LASTEXITCODE -ne 0) { throw "javac failed with exit code $LASTEXITCODE" }
|
|
|
|
& java -cp "$classes;$installLib\*" dev.moonbridge.core.session.RelayBenchmark `
|
|
--connections $Connections --messages $Messages --warmup $Warmup --payload $Payload --repeats $Repeats --window $Window
|
|
if ($LASTEXITCODE -ne 0) { throw "benchmark failed with exit code $LASTEXITCODE" }
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
}
|