Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.

Latest commit

 

History

History
41 lines (32 loc) · 1.37 KB

README.textile

File metadata and controls

41 lines (32 loc) · 1.37 KB

fr.obeo.performance

A simple Java library to record performance data when running tests.

Inspired by Eclipse’s org.eclipse.test.performance, but this is simpler and produces an EMF model for the results instead of storing them inside a relation DB.

Basic usage:

// Create a global PerformanceTestSuite object
PerformanceTestSuite suite = new PerformanceTestSuite("My test suite");
// For each individual test, create a monitor
PerformanceMonitor monitor = suite.createMonitor("Scenario #1");
// Execute the code to test inside monitor.start()/monitor.stop(). 
// You can do multiple iterations, which will be saved as individual data
// points.
for (int i = 0; i < ITERATIONS; i++) {
    monitor.start();
    doSomething();
    monitor.stop();
}
// This marks the end of the scenario
monitor.commit();
// Alternatively, you can use:
monitor.measure(ITERATIONS, new Runnable() {
  public void run() {
    doSomething();
  }
};
// Repeat with other monitors if you have more scenarios
// Finally save the result:
suite.save(URI.createFileURI("/tmp/test.performance"));

Dependencies

  • EMF (but not Eclipse)

License

Copyright © 2011 Obeo. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html