Пример #1
0
        public unsafe static ProfilerRecorder StartNew(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
        {
            char *ptr = statName;

            if (ptr != null)
            {
                ptr += RuntimeHelpers.OffsetToStringData / 2;
            }
            return(new ProfilerRecorder(category, ptr, statName.Length, capacity, options | ProfilerRecorderOptions.StartImmediately));
        }
Пример #2
0
 public static ProfilerRecorder StartNew(ProfilerMarker marker, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     return(new ProfilerRecorder(marker, capacity, options | ProfilerRecorderOptions.StartImmediately));
 }
Пример #3
0
 public ProfilerRecorder(ProfilerMarker marker, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     this = ProfilerRecorder.Create(ProfilerRecorderHandle.Get(marker), capacity, options);
 }
Пример #4
0
 public ProfilerRecorder(ProfilerRecorderHandle statHandle, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     this = ProfilerRecorder.Create(statHandle, capacity, options);
 }
Пример #5
0
        public ProfilerRecorder(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
        {
            ProfilerRecorderHandle byName = ProfilerRecorderHandle.GetByName(category, statName);

            this = ProfilerRecorder.Create(byName, capacity, options);
        }
Пример #6
0
        public unsafe ProfilerRecorder(ProfilerCategory category, char *statName, int statNameLen, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
        {
            ProfilerRecorderHandle byName = ProfilerRecorderHandle.GetByName(category, statName, statNameLen);

            this = ProfilerRecorder.Create(byName, capacity, options);
        }
Пример #7
0
 internal ProfilerRecorder(ProfilerRecorderOptions options)
 {
     this = ProfilerRecorder.Create(default(ProfilerRecorderHandle), 0, options);
 }
 public ProfilerRecorder(string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
     : this(ProfilerCategory.Any, statName, capacity, options)
 {
 }
 public static unsafe ProfilerRecorder StartNew(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     fixed(char *c = statName)
     {
         return(new ProfilerRecorder(category, c, statName.Length, capacity, options | ProfilerRecorderOptions.StartImmediately));
     }
 }
 static extern ProfilerRecorder Create(LowLevel.Unsafe.ProfilerRecorderHandle statHandle, int maxSampleCount, ProfilerRecorderOptions options);
 public ProfilerRecorder(LowLevel.Unsafe.ProfilerRecorderHandle statHandle, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     this = Create(statHandle, capacity, options);
 }
        public unsafe ProfilerRecorder(ProfilerCategory category, char *statName, int statNameLen, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
        {
            var statHandle = LowLevel.Unsafe.ProfilerRecorderHandle.GetByName(category, statName, statNameLen);

            this = Create(statHandle, capacity, options);
        }
 public unsafe ProfilerRecorder(ProfilerCategory category, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     LowLevel.Unsafe.ProfilerRecorderHandle statHandle;
     statHandle = LowLevel.Unsafe.ProfilerRecorderHandle.GetByName(category, statName);
     this       = Create(statHandle, capacity, options);
 }
Пример #14
0
        private static ProfilerRecorder Create(ProfilerRecorderHandle statHandle, int maxSampleCount, ProfilerRecorderOptions options)
        {
            ProfilerRecorder result;

            ProfilerRecorder.Create_Injected(ref statHandle, maxSampleCount, options, out result);
            return(result);
        }
Пример #15
0
 public ProfilerRecorder(string categoryName, string statName, int capacity = 1, ProfilerRecorderOptions options = ProfilerRecorderOptions.Default)
 {
     this = new ProfilerRecorder(new ProfilerCategory(categoryName), statName, capacity, options);
 }
Пример #16
0
 private static extern void Create_Injected(ref ProfilerRecorderHandle statHandle, int maxSampleCount, ProfilerRecorderOptions options, out ProfilerRecorder ret);
 internal ProfilerRecorder(ProfilerRecorderOptions options)
 {
     this = Create(new LowLevel.Unsafe.ProfilerRecorderHandle(), 0, options);
 }