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>
34 lines
1.4 KiB
PowerShell
34 lines
1.4 KiB
PowerShell
param(
|
|
[Parameter(Mandatory)][string]$BaselineLibDirectory,
|
|
[ValidateRange(1, 10)][int]$Pairs = 5,
|
|
[string]$LogPath = (Join-Path $env:TEMP ("moonbridge-transfer-paired-{0}.txt" -f (Get-Date -Format "yyyyMMdd-HHmmss")))
|
|
)
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
$repoRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
$candidateLib = Join-Path $repoRoot "proxy\core\build\install\moonbridge"
|
|
$baselineLib = (Resolve-Path -LiteralPath $BaselineLibDirectory).Path
|
|
if (-not (Test-Path -LiteralPath $baselineLib -PathType Container)) {
|
|
throw "baseline library directory does not exist: $baselineLib"
|
|
}
|
|
|
|
Push-Location $repoRoot
|
|
try {
|
|
for ($pair = 1; $pair -le $Pairs; $pair++) {
|
|
$order = if (($pair % 2) -eq 1) { @("baseline", "candidate") } else { @("candidate", "baseline") }
|
|
foreach ($side in $order) {
|
|
$runtimeLib = if ($side -eq "baseline") { $baselineLib } else { $candidateLib }
|
|
Add-Content -LiteralPath $LogPath -Value "PAIR=$pair SIDE=$side"
|
|
& (Join-Path $PSScriptRoot "run-transfer-path.ps1") -Repeats 5 -OnlyNoSubscriber `
|
|
-RuntimeLibDirectory $runtimeLib *>> $LogPath
|
|
if ($LASTEXITCODE -ne 0) {
|
|
throw "transfer benchmark failed: pair=$pair side=$side exit=$LASTEXITCODE; see $LogPath"
|
|
}
|
|
}
|
|
}
|
|
} finally {
|
|
Pop-Location
|
|
}
|
|
|
|
Write-Host "Paired transfer output: $LogPath"
|