1 28 29 30 package com.caucho.tools.profiler; 31 32 import java.util.Collection ; 33 34 38 public class CategorizingProfilerPoint 39 extends ProfilerPoint 40 { 41 CategorizingProfilerPoint(ProfilerManager profilerManager, String name) 42 { 43 super(profilerManager, name); 44 } 45 46 public ProfilerPoint createProfilerPoint(String name) 47 { 48 return new ProfilerPointParentSettingDelegate(this, getProfilerManager().getProfilerPoint(name)); 49 } 50 51 private static final class ProfilerPointParentSettingDelegate 52 extends ProfilerPoint 53 { 54 private final ProfilerPoint _parent; 55 private final ProfilerPoint _profilerPoint; 56 57 ProfilerPointParentSettingDelegate(ProfilerPoint parent, ProfilerPoint profilerPoint) 58 { 59 super(profilerPoint.getProfilerManager(), "ProfilerPointParentSettingDelegate{" + profilerPoint + "}"); 60 61 assert parent != null; 62 assert profilerPoint != null; 63 64 _parent = parent; 65 _profilerPoint = profilerPoint; 66 } 67 68 public String getName() 69 { 70 return _profilerPoint.getName(); 71 } 72 73 public Profiler start() 74 { 75 return _profilerPoint.start(_parent); 76 } 77 78 public Collection <ProfilerNode> getProfilerNodes() 79 { 80 return _profilerPoint.getProfilerNodes(); 81 } 82 83 public ProfilerNode getProfilerNode(ProfilerNode parentNode) 84 { 85 return _profilerPoint.getProfilerNode(parentNode); 86 } 87 88 public void reset() 89 { 90 _profilerPoint.reset(); 91 } 92 } 93 } 94 | Popular Tags |