Do some jiggery pokery to better classify the zillions of Interval$Unit$1
runnables that get added to the dobjmgr queue. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3675 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -287,7 +287,17 @@ public class PresentsDObjectMgr
|
|||||||
|
|
||||||
if (_eventCount % UNIT_PROFILING_INTERVAL == 0) {
|
if (_eventCount % UNIT_PROFILING_INTERVAL == 0) {
|
||||||
// record the time spent processing this unit
|
// record the time spent processing this unit
|
||||||
String cname = StringUtil.shortClassName(unit);
|
String cname;
|
||||||
|
// to more sensibly record non-event "units" we need to do
|
||||||
|
// some jiggery pokery
|
||||||
|
if (unit instanceof Runnable) {
|
||||||
|
cname = unit.toString();
|
||||||
|
int laidx = cname.lastIndexOf("@");
|
||||||
|
cname = (laidx == -1) ? cname : cname.substring(0, laidx);
|
||||||
|
cname = StringUtil.shortClassName(cname);
|
||||||
|
} else {
|
||||||
|
cname = StringUtil.shortClassName(unit);
|
||||||
|
}
|
||||||
UnitProfile uprof = (UnitProfile)_profiles.get(cname);
|
UnitProfile uprof = (UnitProfile)_profiles.get(cname);
|
||||||
if (uprof == null) {
|
if (uprof == null) {
|
||||||
_profiles.put(cname, uprof = new UnitProfile());
|
_profiles.put(cname, uprof = new UnitProfile());
|
||||||
|
|||||||
Reference in New Issue
Block a user