Token导航 LogoToken导航TokenDH.com
AI Agents Performance Testing MCP Server logo
AI代理未说明官方级别未说明来源级核验

AI Agents Performance Testing MCP Server

MCP Server

一个基于Java开发的MCP服务器,用于测试Discovery Intech客户端的性能和负载能力,支持多种测试模式和结果分析。

工具数

6

提示词数

0

GitHub Stars

0

资源数

0
Java数据分析AI代理

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

RayenMalouche

提供方

RayenMalouche

最后核验

2026/5/17 20:19

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

详细介绍

性能测试MCP服务器

用Java开发的MCP(模型上下文协议)服务器,用于测试InTech发现客户端的性能。

功能

MCP工具可用

  1. run_performance_test -执行单个性能测试
  2. run_load_test -使用多个并发ES请求执行负载测试
  3. 分析测试结果 -分析和总结测试结果
  4. 监视器成本 -监控和跟踪API成本
  5. 基准情景 -执行预定义的基准场景
  6. 导出结果 -将结果导出为不同格式

先决条件

  • Java 21或更高版本
  • Maven 3.8+
  • 正在运行的InTech发现客户端(默认为http://localhost:8072)

安装

  1. 克隆项目
  2. 使用Maven编译:
mvn clean compile

使用

STDIO模式(适用于MCP客户端)

java -cp target/classes com.mcp.RayenMalouche.performance.testing.server.PerformanceTestingServer.PerformanceTestingServerApplication --stdio

HTTP/SSE模式(用于测试和检查)

java -cp target/classes com.mcp.RayenMalouche.performance.testing.server.PerformanceTestingServer.PerformanceTestingServerApplication

HTTP流模式(用于MCP检查器)

java -cp target/classes com.mcp.RayenMalouche.performance.testing.server.PerformanceTestingServer.PerformanceTestingServerApplication --streamable-http

端点

当服务器在HTTP模式下运行时:

  • MCP端点 : http://localhost:45451/
  • SSE端点 : http://localhost:45451/sse
  • 健康检查 : http://localhost:45451/api/health

工具使用示例

1.性能测试独一无二

{
  "query": "Créez un dataset complet sur toutes les solutions Sage de Discovery Intech",
  "targetUrl": "http://localhost:8072",
  "testId": "test_sage_001"
}

2.测试充电

{
  "queries": [
    "Créez un dataset sur les solutions Sage",
    "Générez un dataset sur les solutions QAD",
    "Produisez un dataset sur Microsoft Dynamics 365"
  ],
  "concurrentUsers": 5,
  "requestsPerUser": 2,
  "targetUrl": "http://localhost:8072"
}

3.基准场景

{
  "scenarios": ["sage", "qad", "microsoft", "sap"],
  "targetUrl": "http://localhost:8072"
}

可用场景:

  • sage :Sage解决方案
  • qad :解决方案QAD
  • microsoft :微软Dynamics 365
  • sap :SAP解决方案
  • sectors :活动领域
  • services :提供的服务
  • company :公司信息
  • all :所有场景

4.结果分析

{
  "testIds": ["test_sage_001", "test_qad_002"],
  "generateReport": true
}

5.成本监测

{
  "timeframe": "day",
  "modelName": "llama-3.1-8b-instant"
}

时间范围选项: hour, day, week

6.输出结果

{
  "format": "json",
  "filepath": "/tmp/test_results.json",
  "includeDetails": true
}

可用格式 : json, csv, html

收集的指标

对于每个测试,收集以下指标:

  • 响应时间 (毫秒)
  • 代币名称 使用(估计)
  • 成本 估计(基于GROQ定价)
  • 数据集大小 (元素数)
  • MCP呼叫数 执行
  • 网址 恢复
  • 状态 成功/失败
  • 错误消息 (si适用)

结果结构

测试结果

{
  "testId": "test_001",
  "timestamp": "2025-01-XX:XX:XX",
  "query": "Question de test",
  "responseTime": 15000,
  "tokensUsed": 1500,
  "cost": 0.12,
  "success": true,
  "datasetSize": 25,
  "mcpCallsCount": 8,
  "urlsFetched": ["https://www.discoveryintech.com/..."],
  "errorMessage": null
}

负载测试结果

{
  "testId": "load_test_123",
  "startTime": "2025-01-XX:XX:XX",
  "endTime": "2025-01-XX:XX:XX", 
  "totalTests": 10,
  "successfulTests": 9,
  "failedTests": 1,
  "averageResponseTime": 12500.5,
  "totalTokens": 15000,
  "totalCost": 1.25,
  "concurrentUsers": 5,
  "requestsPerUser": 2
}

配置

默认情况下,服务器使用以下端口:

  • HTTP/SSE : 45451
  • 健康检查 :45451/api/健康

要更改配置,您可以:

  1. 更改源代码中的常量
  2. 环境变量的利用者
  3. 添加application.properties文件

日志记录

日志显示在stderr上,以便不干扰stdout上的MCP协议。

发展

项目结构

src/main/java/com/dicovery/performance/mcp/test/server/
├── PerformanceTestingServerApplication.java  # Classe principale
└── README.md                   # Documentation

汇编和执行

mvn clean compile
mvn spring-boot:run -Dspring-boot.run.arguments="--stdio"

测试

mvn test

故障排除

常见错误

  1. 连接被拒绝 :验证InTech发现客户端是否正在运行
  2. 超时 :增加长请求的超时
  3. JSON解析错误 :检查请求的格式

调试

通过添加以下内容激活详细日志:

-Dlogging.level.com.dicovery=DEBUG

贡献

  1. 分叉项目
  2. 创建功能分支
  3. 提交您的更改
  4. 向分支推
  5. 创建拉取请求

目录标签

目录标签

Java数据分析AI代理性能测试本地部署负载测试Java开发MCP协议

接入字段

传输方式(transport,传输协议)

未说明

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

6

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

未说明none部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

仍需确认:installCommand

来源信息

继续浏览同类 MCP