-
Notifications
You must be signed in to change notification settings - Fork 113
@Profile
Daan van Yperen edited this page Sep 29, 2015
·
11 revisions
Profile EntitySystems
with user-specified profiler class.
Injects conditional profiler call at start of begin()
and before any exit point in end()
.
See Weave Automation.
###What you type:
@Profile(using=MyProfiler.class, enabled=true)
public class VoidSystem extends VoidEntitySystem {
public VoidSystem() {
super();
}
@Override
protected void processSystem() {
// process system
}
}
###What the JVM gets:
public class VoidSystem extends VoidEntitySystem {
private MyProfiler $profiler;
public VoidSystem() {
super();
}
@Override
protected void initialize() {
$profiler = new MyProfiler();
$profiler.initialize(this, world);
}
@Override
protected void begin() {
$profiler.start();
}
@Override
protected void end() {
$profiler.stop();
}
@Override
protected void processSystem() {
// process system
}
}
- Overview
- Concepts
- Getting Started
- Using
- More guides
- Plugins
- Game Gallery
- Tools and Frameworks
- API reference