|
@@ -1,7 +1,5 @@
|
|
-package com.jme3.post;
|
|
|
|
|
|
+package com.jme3.app;
|
|
|
|
|
|
-import com.jme3.app.Application;
|
|
|
|
-import com.jme3.app.SimpleApplication;
|
|
|
|
import com.jme3.app.state.BaseAppState;
|
|
import com.jme3.app.state.BaseAppState;
|
|
import com.jme3.font.BitmapFont;
|
|
import com.jme3.font.BitmapFont;
|
|
import com.jme3.font.BitmapText;
|
|
import com.jme3.font.BitmapText;
|
|
@@ -18,8 +16,6 @@ import java.text.DecimalFormat;
|
|
import java.text.DecimalFormatSymbols;
|
|
import java.text.DecimalFormatSymbols;
|
|
import java.util.*;
|
|
import java.util.*;
|
|
|
|
|
|
-import static com.jme3.post.DetailedProfiler.*;
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* Created by Nehon on 25/01/2017.
|
|
* Created by Nehon on 25/01/2017.
|
|
*/
|
|
*/
|
|
@@ -164,7 +160,7 @@ public class DetailedProfilerState extends BaseAppState {
|
|
}
|
|
}
|
|
maxLevel = Math.max(maxLevel, path.split("/").length);
|
|
maxLevel = Math.max(maxLevel, path.split("/").length);
|
|
StatLineView line = getStatLineView(path);
|
|
StatLineView line = getStatLineView(path);
|
|
- StatLine statLine = data.get(path);
|
|
|
|
|
|
+ DetailedProfiler.StatLine statLine = data.get(path);
|
|
line.updateValues(statLine.getAverageCpu(), statLine.getAverageGpu());
|
|
line.updateValues(statLine.getAverageCpu(), statLine.getAverageGpu());
|
|
String parent = getParent(path);
|
|
String parent = getParent(path);
|
|
while (parent != null) {
|
|
while (parent != null) {
|
|
@@ -236,12 +232,16 @@ public class DetailedProfilerState extends BaseAppState {
|
|
public void postRender() {
|
|
public void postRender() {
|
|
if (time > REFRESH_TIME) {
|
|
if (time > REFRESH_TIME) {
|
|
prof.appStep(AppStep.EndFrame);
|
|
prof.appStep(AppStep.EndFrame);
|
|
- Map<String, StatLine> data = prof.getStats();
|
|
|
|
|
|
+ Map<String, DetailedProfiler.StatLine> data = prof.getStats();
|
|
displayData(data);
|
|
displayData(data);
|
|
time = 0;
|
|
time = 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ public Node getUiNode() {
|
|
|
|
+ return ui;
|
|
|
|
+ }
|
|
|
|
+
|
|
private double getMsFromNs(double time) {
|
|
private double getMsFromNs(double time) {
|
|
return time / 1000000.0;
|
|
return time / 1000000.0;
|
|
}
|
|
}
|