Socket
Socket
Sign inDemoInstall

@iopipe/profiler

Package Overview
Dependencies
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iopipe/profiler

IOpipe plugin for running the v8 profiler on your functions


Version published
Weekly downloads
3
Maintainers
7
Weekly downloads
 
Created
Source

IOpipe Profiler Plugin

styled with prettier semantic-release

This is a profiler and tracing library for use with IOpipe and AWS Lambda.

Installation:

With yarn (recommended) in project directory:

yarn add @iopipe/profiler

With npm in project directory:

npm install @iopipe/profiler

Then include the plugin with IOpipe in your serverless function:

const iopipeLib = require('@iopipe/iopipe');
const profiler = require('@iopipe/profiler');

const iopipe = iopipeLib({
  token: 'TOKEN_HERE',
  plugins: [profiler({ enabled: true, heapSnapshot: true })]
});

exports.handler = iopipe((event, context) => {
  context.succeed('Wow!');
});

Config

enabled (bool: optional = false)

By default, this plugin will not run the profiler. You must enable profiling on your function either by setting this variable, or setting IOPIPE_ENABLE_PROFILER=true in your environment. The environment variable setting (either true or unset) takes precedence over plugin config.

heapSnapshot (bool: optional = false)

By default, this plugin will not take heap snapshots. To enable heap snapshots, either set this value to true, or setting IOPIPE_ENABLE_HEAPSNAPSHOT=true in your environment. The environment variable setting (either true or unset) takes precedence over plugin config.

recSamples (bool: optional = true)

Record samples, defaults to true.

sampleRate (number: optional = 1000)

Change the sampling interval, in microseconds. Defaults to 1000us.

debug (bool: optional = false)

Show debugging logs.

Environment Variables

To enable profiling via environment variable, set IOPIPE_ENABLE_PROFILER to true in your environment.

License

Apache-2.0 see LICENSE

Copyright 2017, IOpipe, Inc.

Keywords

FAQs

Package last updated on 28 Jun 2018

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