GithubHelp home page GithubHelp logo

coreylight / iopipe-plugin-profiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from iopipe/iopipe-js-profiler

0.0 2.0 0.0 344 KB

Profiling and tracing for AWS Lambda

License: Apache License 2.0

JavaScript 100.00%

iopipe-plugin-profiler's Introduction

IOpipe Profiler Plugin

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');
const profiler = require('@iopipe/profiler');

const iopipe = iopipeLib({
  plugins: [profiler({ enabled: 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.

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.

iopipe-plugin-profiler's People

Contributors

coreylight avatar ewindisch avatar pselle avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.