Code Monkey home page Code Monkey logo

bam-hbt / kopeme Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dagere/kopeme

0.0 0.0 0.0 74.13 MB

KoPeMe is a framework for executing a performance measurement of a performance unit test (which can be easily created from a regular JUnit test) inside *one* vm execution. Since using the measurement values from one vm execution is not sufficient, the measurement needs to be repeated e.g. using Peass (or by writing own small bash scripts).

License: GNU General Public License v3.0

Shell 0.02% Java 99.98%

kopeme's Introduction

KoPeMe

KoPeMe is a framework for enabling performance tests in Java. This makes it possible to live a software development process where performance measures are taken continously and therefore react continously to changes in performance. With continous performance testing, one avoids refactorings after performance problems occured in a big testing phase before releasing the software.

Usage

KoPeMe got three possibilities to enable performance tests in Java:

  • Using JUnit 4 with the performance test runner, by adding @RunWith(PerformanceTestRunnerJUnit.class) as annotation at class level
  • Using JUnit 4 with the rule, by adding @Rule public TestRule rule = new KoPeMeRule(this); as instance variable to the class
  • Using Junit 5 with the extension, by adding @ExtendWith(KoPeMeExtension.class) as annotation at class level
  • Using JUnit 3, using extends KoPeMeTestcase (instead extends TestCase). This is mainly for compatibility with old software and is not recommended for daily use.
  • Using kopeme-core, by running PerformanceTestRunnerKoPeMe for a class with performance tests

One of these variants should be enabled.

Additionally, the test should be annotated, e.g. like

@Test
@PerformanceTest(iterations = 500, warmup = 500, repetitions = 100)
public void measureMe() {

The usual JUnit test annotation should still be added if JUnit tests are measured.

The workload inside the test is repeated repetitions*iterations times, and iterations duration measurements are done (each after repetitions executions). Before this, repetitions*warmup workload executions are done without measurement (for warming up the current VM).

Dependencies

For JUnit 4 or 5 tests, please add

<dependency>
    <groupId>de.dagere.kopeme</groupId>
    <artifactId>kopeme-junit</artifactId>
    <version>0.13</version>
</dependency>

to your build.

For JUnit 3 tests, please add

<dependency>
    <groupId>de.dagere.kopeme</groupId>
    <artifactId>kopeme-junit3</artifactId>
    <version>0.13</version>
</dependency>

to your build.

Results

After measurement, in your KOPEME_HOME-folder, a result-file will be placed. It will be extended by new results in every new run. If you don't define KOPEME_HOME-folder, the file will be placed in your HOME-Folder in .KoPeMe.

kopeme's People

Contributors

dagere avatar dhaeb avatar mawhbt avatar bam-hbt avatar alex-iotiq avatar anbadv avatar maroe avatar mai13drd 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.