GithubHelp home page GithubHelp logo

phax / profiler Goto Github PK

View Code? Open in Web Editor NEW

This project forked from papertrail/profiler

0.0 2.0 1.0 34 KB

Port of Twitter's Scala JVM-profiler to Java

License: Apache License 2.0

Java 100.00%

profiler's Introduction

This is a fork of https://github.com/papertrail/profiler/ version 1.0.3-SNAPSHOT

  • Requires Java 8 and therefore no dependency on joda-time anymore (since v1.1.0)
  • Now as OSGI bundle (since v1.1.1)

It's meant to be a simple replacement using the same package name as the original (just with the Java 8 Duration type)

Original sources Copyright 2015 Papertrail, Inc.

JVM cpu profiler

A pure-java implementation of the twitter/util project's CpuProfile and related classes.

Original Scala sources:

Usage

The CpuProfile.record method will record samples of stacktrace elements and return a CpuProfile object. That object can then be written into a pprof-parseable format using CpuProfile.writeGoogleProfile.

There is a provided JAX-RS resource that makes this simple to use with an http service. For example, with a Dropwizard application:

environment.jersey().register(CpuProfileResource.class);

Which exposes the URLs /pprof/contention that detects blocked threads, and /pprof/profile that detects runnable threads. Here is an example of using curl to retrieve a profile and turn it into a PDF:

curl http://localhost:8181/pprof/contention > prof
pprof --pdf prof > profile.pdf

Maven usage

<dependency>
  <groupId>com.helger</groupId>
  <artifactId>profiler</artifactId>
  <version>1.1.1</version>
</dependency>

profiler's People

Contributors

phax avatar lucky avatar

Watchers

James Cloos avatar  avatar

Forkers

lp2jx0309

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.