Beispiel #1
0
        // 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)
        }
Beispiel #2
0
        // 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)
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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);
        }