public static void StopProfiling(IceProfilerNames id) { #if (PROFILE) if (ProfilingEnabled) { IceProfile Item = GetProfileByName((int)id); if (Item == null) { throw new NotSupportedException("Profile doesn't exist"); } if (!Item.IsProfiling) { throw new NotSupportedException(id + " isn't currently profiling, try starting it first"); } Item.StopProfiling(); } #endif }
public static void StartProfiling(IceProfilerNames id) { #if(PROFILE) if (ProfilingEnabled) { IceProfile Item = GetProfileByName((int)id); if (Item == null) { Item = new IceProfile((int)id); PropertyProfiles.Add((int)id, Item); } if (Item.IsProfiling) throw new NotSupportedException(id + " is currently profiling, try stopping it first"); Item.StartProfiling(); } #endif }
public static void StartProfiling(IceProfilerNames id) { #if (PROFILE) if (ProfilingEnabled) { IceProfile Item = GetProfileByName((int)id); if (Item == null) { Item = new IceProfile((int)id); PropertyProfiles.Add((int)id, Item); } if (Item.IsProfiling) { throw new NotSupportedException(id + " is currently profiling, try stopping it first"); } Item.StartProfiling(); } #endif }