Skip to main content
Glama

get_performance_stats

Retrieve detailed performance statistics for image processing tasks using the MCP server, enabling users to monitor efficiency and optimize workflows.

Instructions

获取性能统计信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • main.py:793-807 (handler)
    MCP tool handler for get_performance_stats: calls the utility function and formats response as JSON with success/error handling.
    @mcp.tool() def get_performance_stats() -> str: """获取性能统计信息""" try: stats = utils_get_performance_stats() return json.dumps({ "success": True, "data": stats }, ensure_ascii=False, indent=2) except Exception as e: return json.dumps({ "success": False, "error": f"获取性能统计失败: {str(e)}" }, ensure_ascii=False, indent=2)
  • Core helper function that aggregates and returns performance statistics from global monitors.
    def get_performance_stats() -> Dict[str, Any]: """获取完整的性能统计""" return { "monitor": performance_monitor.get_stats(), "cache": image_cache.get_stats(), "resources": resource_manager.get_stats(), "timestamp": time.time() }
  • main.py:85-85 (registration)
    Import of the performance utility function aliased for use in the main tool handler.
    from utils.performance import get_performance_stats as utils_get_performance_stats, reset_performance_stats as utils_reset_performance_stats

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/duke0317/ps-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server