Giter Club home page Giter Club logo

fastpan's Introduction

fastpan

GitHub tag Travis Coverage license

A framework for model-agnostic software performance analysis. The framework currently features:

  • An opinionated way to define performance analyzers
  • A strictly-typed definition of analysis results

Attention: This project is a work in progress and as such, the API is unstable and may change anytime. For recent changes refer to the change log.

Installation

Using Maven

Define a dependency to this project using JitPack:

<dependency>
    <groupId>com.github.DECLARE-Project</groupId>
    <artifactId>fastpan</artifactId>
    <version>v1.0.0</version>
</dependency>

Make sure to define the JitPack repository:

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

Download a JAR

Download the latest release from the GitHub releases.

From Source

  • Check out this project from source.
  • Hop on a shell and run mvn clean install. You may also do this from your favorite IDE.
  • You may export this project as standalone JAR library including all required dependencies by running mvn clean package. The JAR file is then created in /target/*.jar.

Usage

Performance Analyzer

To define a performance analyzer, you need to implement two interfaces: PerformanceAnalyzer and AnalysisContext. Both interfaces are generic and require you to write the analyzer for a certain <SYSTEM>, which refers to the class you use to model the system to be analyzed.

The PerformanceAnalyzer can be seen as a factory to setup and configure the actual analysis. By doing so, the variability analysis can make use of the analyzer to setup and run the analysis for an arbitrary number of systems. Implementing a PerformanceAnalyzer is straightforward:

public class MyAnalyzer implements PerformanceAnalyzer<MySystem, MyAnalysisContext> {

    /**
     * Returns the capabilities of this performance analysis approach.
     */
    Set<AnalysisCapability> capabilities() {
        return new HashSet<>(Arrays.asList(AnalysisCapability.FAST_EXECUTION));
    }

    /**
     * Determines whether the analysis approach supports the given system.
     */
    boolean supports(MySystem system) {
        return true;
    }

    /**
     * Sets up and configures the analysis.
     */
    MyAnalysisContext setupAnalysis(MySystem system) {
        // setup dependencies, configurations, and so on
        return new MyAnalysisContext(system);
    }
}

The AnalysisContext now defines the actual analysis and provides the results:

public class MyPerformanceResult extends AbstractPerformanceResult { 
    // tailor the result to provide additional context for MySystem
}

public class MyAnalysisContext implements AnalysisContext<MySystem> {

    private MySystem system;
    public MyAnalysisContext(MySystem system) { this.system = system; }

    /**
     * Runs the analysis and yields the performance results.
     */
    PerformanceResult<?> analyze() {
        // do some heavy computation
        
        MyPerformanceResult result = new MyPerformanceResult();
        // attach a mean service time of 240ms to a specific element of MySystem
        result.attach(Attach.to(mySystemElement).serviceTime(Duration.ofMilliseconds(240)).mean());
        return result;
    }
}

Variability Analyzer

TBD.

In the Wild

There are performance analyzers in the wild using this abstraction. Take them and integrate them into your project.

Performance Analyzers

  • palladio-headless: Binds to the Palladio LQNS solver to deliver analysis results. Works without Eclipse and is open to be extended by more analyzers of the Palladio tool suite.

Variability Analyzers

Want to add your analyzer to the list? Just submit a pull request.

Release

To release a new version, run the following commands:

mvn release:prepare
mvn release:perform -Darguments="-Dmaven.javadoc.skip=true"

Contributing

Open a PR :-)

See all changes made to this project in the change log. This project follows semantic versioning.

This project is licensed under the terms of the MIT license.


Project created and maintained by Fabian Keller in the scope of his master's thesis.

fastpan's People

Contributors

fakleiser avatar

Watchers

 avatar  avatar  avatar

fastpan's Issues

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.