Example #1
0
 private void AddProfilerMarkers(SampleGroupDefinition[] samplesGroup)
 {
     foreach (var sample in samplesGroup)
     {
         var sampleGroup = new SampleGroup(sample);
         sampleGroup.GetRecorder();
         sampleGroup.Recorder.enabled = false;
         m_SampleGroups.Add(sampleGroup);
     }
 }
Example #2
0
        public ActionMeasurement ProfilerMarkers(IEnumerable <string> profilerMarkers)
        {
            foreach (var marker in profilerMarkers)
            {
                var sampleGroup = new SampleGroup(marker, Unity.PerformanceTesting.SampleUnit.Nanosecond);
                sampleGroup.GetRecorder().enabled = false;
                sampleGroups.Add(sampleGroup);
            }

            return(this);
        }
Example #3
0
        public MethodMeasurement ProfilerMarkers(params string[] profilerMarkerNames)
        {
            if (profilerMarkerNames == null)
            {
                return(this);
            }
            foreach (var marker in profilerMarkerNames)
            {
                var sampleGroup = new SampleGroup(marker, SampleUnit.Nanosecond, false);
                sampleGroup.GetRecorder();
                sampleGroup.Recorder.enabled = false;
                m_SampleGroups.Add(sampleGroup);
            }

            return(this);
        }
Example #4
0
 private void AddProfilerSample(SampleGroup sampleGroup)
 {
     sampleGroup.GetRecorder();
     sampleGroup.Recorder.enabled = true;
     m_SampleGroups.Add(sampleGroup);
 }