Beispiel #1
0
        static void Main(string[] args)
        {
            Console.WriteLine("PARSING START:" + DateTime.Now.ToLongTimeString());
            TCacheGrind cache = new TCacheGrind();

            cache.Load(@"c:\wamp\tmp\cachegrind.out.1531400630.16376", false);
            Console.WriteLine("PARSING END:" + DateTime.Now.ToLongTimeString());
            Console.ReadLine();
        }
Beispiel #2
0
 public TProfFunc(TCacheGrind ACacheGrind, string AName, string AFileName)
 {
     CacheGrind    = ACacheGrind;
     Name          = AName;
     FileName      = AFileName;
     ShortFileName = GetShortFileName();
     ShortName     = GetShortName();
     Instances     = new List <TProfInstance>();
     // analyze Name to get Kind
     Kind = TFuncKind.fkFunc;
     if (AName.StartsWith("include::") || AName.StartsWith("include_once::") || AName.StartsWith("require::") || AName.StartsWith("require_once::"))
     {
         Kind = TFuncKind.fkInclude;
     }
     else if (AName.StartsWith("php::"))
     {
         Kind = TFuncKind.fkLibFunc;
     }
     else if (IsCons(AName))
     {
         Kind = TFuncKind.fkConstructor;
     }
     else if (IsDest(AName))
     {
         Kind = TFuncKind.fkDestructor;
     }
     else if (AName.Contains("->object") || AName.Contains("__construct") || AName.Contains("::pear"))
     {
         Kind = TFuncKind.fkConstructor;
     }
     else if (AName.Contains("__destruct") || AName.Contains("_object") || AName.Contains("::_pear"))
     {
         Kind = TFuncKind.fkDestructor;
     }
     else if (AName.Contains("::_") || AName.Contains("->_"))
     {
         Kind = TFuncKind.fkPrivateMethod;
     }
     else if (AName.Contains("::"))
     {
         Kind = TFuncKind.fkStaticMethod;
     }
     else if (AName.Contains("->"))
     {
         Kind = TFuncKind.fkPublicMethod;
     }
 }