Module: DebugAgent
- Extended by:
- ClassMethods
- Defined in:
- lib/debug_agent.rb,
lib/debug_agent/config.rb,
lib/debug_agent/engine.rb,
lib/debug_agent/version.rb,
lib/debug_agent/chat_page.rb,
lib/debug_agent/llm_client.rb,
lib/debug_agent/middleware.rb,
lib/debug_agent/chat_session.rb,
lib/debug_agent/inspectors/gc.rb,
lib/debug_agent/tool_registry.rb,
lib/debug_agent/inspectors/routes.rb,
lib/debug_agent/inspectors/system.rb,
lib/debug_agent/context_compressor.rb,
lib/debug_agent/inspectors/runtime.rb,
lib/debug_agent/inspectors/threads.rb,
lib/debug_agent/system_prompt_builder.rb,
lib/debug_agent/inspectors/http_tracker.rb,
lib/debug_agent/inspectors/object_space.rb,
lib/debug_agent/inspectors/process_info.rb
Defined Under Namespace
Modules: ChatPage, ClassMethods, HttpRequestTracker, Middleware, MiddlewareCore, ToolDefinitionExt Classes: ChatCallback, ChatSession, CompressionResult, Config, ContextCompressor, DebugEngine, EngineStreamHandler, Error, LLMClient, LLMConfig, RackMiddleware, RetriableError, SseCallback, StreamHandler, SystemPromptBuilder, ToolDefinition, ToolParam, ToolRegistry
Constant Summary collapse
- PROCESS_START_TIME =
Process start time for uptime tracking
Time.now
- VERSION =
'0.2.6'.freeze
- REGISTRY =
Global registry singleton
ToolRegistry.new
- CATEGORY_MAP =
{ 'gc' => 'Memory & GC', 'object_space' => 'Memory & GC', 'memory' => 'Memory & GC', 'object_count' => 'Memory & GC', 'allocations' => 'Memory & GC', 'force_gc' => 'Memory & GC', 'trigger_gc' => 'Memory & GC', 'process' => 'Process Info', 'cpu' => 'Process Info', 'uptime' => 'Process Info', 'thread' => 'Threads', 'system' => 'System Info', 'disk' => 'System Info', 'environment' => 'System Info', 'routes' => 'Framework & Routes', 'middleware' => 'Framework & Routes', 'runtime' => 'Runtime Info', 'recent' => 'HTTP Requests', 'slow' => 'HTTP Requests', 'error' => 'HTTP Requests', 'request' => 'HTTP Requests', 'gem' => 'Dependencies', 'module' => 'Module Info', }.freeze
- MAX_REQUESTS =
500
Class Attribute Summary collapse
-
.app ⇒ Object
Returns the value of attribute app.
Class Method Summary collapse
-
.format_uptime(seconds) ⇒ Object
Helper method for formatting uptime.
Methods included from ClassMethods
Class Attribute Details
.app ⇒ Object
Returns the value of attribute app.
32 33 34 |
# File 'lib/debug_agent.rb', line 32 def app @app end |
Class Method Details
.format_uptime(seconds) ⇒ Object
Helper method for formatting uptime
48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/debug_agent/inspectors/process_info.rb', line 48 def self.format_uptime(seconds) days = (seconds / 86400).to_i hours = ((seconds % 86400) / 3600).to_i minutes = ((seconds % 3600) / 60).to_i secs = (seconds % 60).to_i parts = [] parts << "#{days}d" if days > 0 parts << "#{hours}h" if hours > 0 || days > 0 parts << "#{minutes}m" if minutes > 0 || hours > 0 || days > 0 parts << "#{secs}s" parts.join(' ') end |