Skip to content

Feature: Inline Metrics with SparklineΒ #32

Description

@yimsk

Inline Metrics with Sparkline πŸ“Š

Display real-time metrics as sparklines directly in resource lists.

Concept

β”Œ EC2 Instances ─────────────────────────────────────────────┐
β”‚ Name          State    CPU(15m)     Type       Region     β”‚
β”‚ web-prod-1    running  β–‚β–ƒβ–…β–‡β–…β–ƒβ–‚ 45%  t3.medium  us-east-1  β”‚
β”‚ web-prod-2    running  ▁▁▂▁▁▁▁  8%  t3.medium  us-east-1  β”‚
β”‚ batch-worker  running  β–‡β–‡β–‡β–‡β–‡β–‡β–‡ 95%  c5.xlarge  us-east-1  β”‚
β”‚ db-replica    running  Β·Β·Β·Β·Β·Β·Β·  -   t3.small   us-east-1  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
[M] Toggle metrics | Loading metrics... (3/4)

Target Resources

Resource Metrics
EC2 CPUUtilization
RDS CPUUtilization, FreeableMemory
Lambda Invocations, Errors
ECS Service CPUUtilization, MemoryUtilization
ELB RequestCount

Implementation

  1. MetricFetcher: CloudWatch GetMetricData batch API
  2. Sparkline Renderer: Unicode blocks β–β–‚β–ƒβ–„β–…β–†β–‡β–ˆ
  3. Async Loading: Show list first, fill metrics progressively
  4. Toggle: M key to enable/disable (default OFF to save API calls)

Technical Notes

  • Use GetMetricData for batch efficiency
  • 15-minute window, 1-minute resolution (15 data points)
  • Cache metrics for short period to avoid repeated calls

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions