Giter Site home page Giter Site logo

ulyp's Introduction

Build Status FOSSA Status

Preface

Ulyp is a proof-of-concept tracing instrumentation agent which records an execution of desired methods and sends them to UI. The agent should be provided only with two parameters: packages in which classes should be instrumented and a strating point in the following format: (simple class name).(method name). The starting point may be Runnable.run or it may contain a wildcard, like: UserDao.*.

The main purpose is mostly research of frameworks and troubleshooting of heavy enterprise applications where frameworks like Hibernate or Spring may call thousands of methods. Please note, the agent has very high performance impact and it's very intrusive.

Usage

Ulyp is bundled with very simple desktop UI written on JavaFX and agent itself.

Agent has the following props which are set as java system properties (via -Dkey=value)

Property Mandatory Default value Example Description
ulyp.ui-hostNolocalhostlocalhostTarget host for UI connection
ulyp.ui-portNo1399113991Target port for UI connection
ulyp.max-depthNoInteger.MAX_VALUE20Max depth of call trace tree. May be useful for limiting instrumentation data
ulyp.ui-portNo1399113991Target port for UI connection
ulyp.logNo-Used as -Dulyp.logTurns on agent logging

Example of running java app with the agent:

java -javaagent:C:\Work\Tools\ulyp-agent-0.1\ulyp-agent-0.1.jar -Dulyp.packages=com.demo,org.hibernate,org.h2 -Dulyp.start-method=JpaProxyUserRepositoryIntegrationTest.sampleTestCase YourClassName

Build

./gradlew clean build test

Simplest example: Fibbonaci numbers

package com.example;

public class FibbonaciTest {
    @Test
    public void test() {
	Assert.assertEquals(13, compute(7));
    }

    public static int compute(int n) {
	if (n <= 1)
	    return n;
	return compute(n - 1) + compute(n - 2);
    }
}

In order to activate ulyp the test should be executed with the following additional VM key:

-javaagent:C:\Work\ulyp\ulyp-agent\build\libs\ulyp-agent-0.2.jar

Specify "com" package to be instrumented and "FibbonaciTest.test" as tracing start method in UI and run the test:

Ulyp UI

Example (hibernate + h2 database)

Simple hibernate test recording:

@Autowired
private JpaProxyUserRepository repository;

@Test
public void sampleTestCase() {
	User dave = new User("Dave", "Mathews");
	dave = repository.save(dave);
}

The whole method traces tree may be investigated in the UI:

Ulyp UI

License

FOSSA Status

ulyp's People

Contributors

0xaa4eb avatar fossabot avatar

Forkers

liweiyuan

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.