Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

autohost-memwatch

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autohost-memwatch

A memwatch authohost resource for help tracking memory leaks.

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

Autohost Memwatch

An API for collecting and reporting memory usage for the purpose of detecting and tracking down memory leaks in Node services. Uses memwatch-next.

API

Status

Request GET /ah/memoryProfile/status

Response

{
  "lastEvent": "",
  "lastGC": {
  	"timestamp": "",
    "num_full_gc": 17,
    "num_inc_gc": 8,
    "heap_compactions": 8,
    "estimated_base": 2592568,
    "current_base": 2592568,
    "min": 2499912,
    "max": 2592568,
    "usage_trend": 0
  },
  "lastLeak": {
  	"timestamp": "",
    "start": "Fri, 29 Jun 2012 14:12:13 GMT",
    "end": "Fri, 29 Jun 2012 14:12:33 GMT",
    "growth": 67984,
    "reason": "heap growth over 5 consecutive GCs (20s) - 11.67 mb/hr"
  },
  "lastDiff": {
    "timestamp": "",
    "before": { "nodes": 11625, "size_bytes": 1869904, "size": "1.78 mb" },
    "after":  { "nodes": 21435, "size_bytes": 2119136, "size": "2.02 mb" },
    "change": { "size_bytes": 249232, "size": "243.39 kb", "freed_nodes": 197,
      "allocated_nodes": 10007,
      "details": [
        { "what": "String",
          "size_bytes": -2120,  "size": "-2.07 kb",  "+": 3,    "-": 62
        },
        { "what": "Array",
          "size_bytes": 66687,  "size": "65.13 kb",  "+": 4,    "-": 78
        }
      ]
    }
  }
}

Details

Request GET /ah/memoryProfile/:profile

Response

{
  "lastEvent": "",
  "lastGC": {
  	"timestamp": "",
    "num_full_gc": 17,
    "num_inc_gc": 8,
    "heap_compactions": 8,
    "estimated_base": 2592568,
    "current_base": 2592568,
    "min": 2499912,
    "max": 2592568,
    "usage_trend": 0
  },
  "lastLeak": {
  	"timestamp": "",
    "start": "Fri, 29 Jun 2012 14:12:13 GMT",
    "end": "Fri, 29 Jun 2012 14:12:33 GMT",
    "growth": 67984,
    "reason": "heap growth over 5 consecutive GCs (20s) - 11.67 mb/hr"
  },
  "lastDiff": {
    "timestamp": "",
    "before": { "nodes": 11625, "size_bytes": 1869904, "size": "1.78 mb" },
    "after":  { "nodes": 21435, "size_bytes": 2119136, "size": "2.02 mb" },
    "change": { "size_bytes": 249232, "size": "243.39 kb", "freed_nodes": 197,
      "allocated_nodes": 10007,
      "details": [
        { "what": "String",
          "size_bytes": -2120,  "size": "-2.07 kb",  "+": 3,    "-": 62
        },
        { "what": "Array",
          "size_bytes": 66687,  "size": "65.13 kb",  "+": 4,    "-": 78
        }
      ]
    }
  }
}

List

Including a ?details=true parameter will cause the list to include the detail for each profile captured instead of only providing the ids.

Request GET /ah/memory

Response

{
  "memoryProfiles": []
}

Delete

Request DELETE /ah/memoryProfile/:profile

Response

{
	"message": "Deleted profile :profile"
}

Keywords

FAQs

Package last updated on 31 Aug 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc