Giter Site home page Giter Site logo

0xaa4eb / ulyp Goto Github PK

View Code? Open in Web Editor NEW
16.0 5.0 2.0 7.48 MB

Simple and small recording debugger for JVM-based apps

License: Apache License 2.0

Java 90.21% CSS 0.52% Kotlin 9.26%
java agent debugger byte-buddy bytecode-instrumentation javafx bytecode-manipulation debugging flamegraph

ulyp's Introduction

Price Build Status Quality Gate Status Maintainability lines of code

TL;DR

Ulyp instruments all third-party library classes and record their method calls including return values and arguments, so that you can have a better understanding of what your code does. Instrumentation is done by byte-buddy library. UI is written using JavaFX.

Here is the example of recorded execution of Hibernate framework

```
@Transactional
public void save(Person person) {
    personRepository.save(person);
}
```

Hibernate call recorded

Example of usage

Usage is relatively simple.

  • First, download or build the agent

  • Second, use VM properties in order to enable the recording. Here is the minimum set of options one will need for recording.

    -javaagent:~/Work/ulyp/ulyp-agent/build/libs/ulyp-agent-0.2.1.0.jar
    -Dulyp.methods=**.HibernateShowcase.save
    -Dulyp.collections=JAVA
    -Dulyp.constructors
    -Dulyp.file=/tmp/hibernate-recording.dat
    

Whenever methods with name save and class name **.HibernateShowcase (inheritors including) are called, recording will start. The data is written to the specified file which can later be opened in the UI.

Similar projects

Ulyp is POC and unstable all the time since the beginning. There are already similar projects which you might consider to use before Ulyp.

Project Link Source
Bugjailbugjail.comClosed source
Findtheflowfindtheflow.ioClosed source

Build from source

Build agent (no tests): ./gradlew :ulyp-agent:shadowJar

Build UI jar file (Java 11+ (preferred) or Java 8 Oracle with Java FX bundled) : ./gradlew :ulyp-ui:fatJar

UI jar file for a particular platform can be built as follows: ./gradlew :ulyp-ui:fatJar -Pplatform=mac

Available platforms for the build are: linux, linux-aarch64, win, mac, mac-aarch64

Key details

All instrumentation is done using byte buddy library. All Java objects are recorded by the recorders. Each recorder supports a particular set of Java types and is responsible for serializing object values into bytes. Note that Ulyp doesn't fully serialize objects. Let's say, for String the first couple of hundred symbols are only recorded.

All data is written to file in a flat format. UI later uses RocksDB in order to build the index

UI

UI Controls

Hotkey Action
Hold ShiftShow full type names
Hold XShow method call duration (if enabled with -Dulyp.timestamps while recording)
Press =Increase font size
Press -Decrease font size

ulyp's People

Contributors

0xaa4eb avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.