// call this in your init_world to turn on profiling. This changes what POSH.agent_base.AgentBase effectively does. // this is a class method and needs no instance public static void turnOnProfiling() { initProfile = new InitProfile(_reallyInitProfile); //turnOnProfiling = staticmethod(turnOnProfiling) //_reallyInitProfile = classmethod(_reallyInitProfile) //initProfile = classmethod(initProfile) }
private Profiler(string name) { this.name = name; this.logger = new Dictionary <string, int>(); this.associations = new Dictionary <string, string>(); this.counts = new Dictionary <string, int>(); this.avgs = new Dictionary <string, float>(); this.totalCalls = 0; initProfile = new InitProfile(_initProfile); }
private Profiler(string name) { this.name = name; this.logger = new Dictionary<string, int>(); this.associations = new Dictionary<string, string>(); this.counts = new Dictionary<string,int>(); this.avgs = new Dictionary<string,float>(); this.totalCalls = 0; initProfile = new InitProfile(_initProfile); }