示例#1
0
        public InstrumentationPoint(string name, InstrumentationAPI apiRoot)
        {
            parent       = apiRoot;
            Name         = name;
            AssemblyName = "";

            instrumentationPointAssemblyDefinition = null;
            instrumentationPointTypeDefinition     = null;
            instrumentationPointMethodDefinition   = null;
        }
示例#2
0
        public void EnableBootstrap()
        {
            BootstrapBrokerInstanceHelper bootstrapHelper = new BootstrapBrokerInstanceHelper(this);
            InstrumentationAPI            iapi            = this;

            foreach (InstrumentationPoint i in mapInstrumentationPointNamesToSpecifications.Values)
            {
                InstrumentationPoint ctor =
                    new InstrumentationPoint("ctor", iapi)
                    .FindInAssemblyNamed(i.instrumentationPointAssemblyDefinition.Name.Name)
                    .FindInTypeNamed(i.instrumentationPointTypeDefinition.Name)
                    .FindMethodNamed(".ctor");
                bootstrapHelper.StartingAtEntry(ctor);
            }
        }
示例#3
0
 public BootstrapBrokerInstanceHelper(InstrumentationAPI i) : base(i)
 {
 }
示例#4
0
 /// <summary>
 /// Helper for commonly used System.Diagnostics.Stopwatch functionality in DT.
 /// Not a feature complete copy of the Stopwatch class.
 ///
 /// Weaves as follows:
 /// var sw = Stopwatch.StartNew();
 /// sw.Stop();
 /// do something with sw.ElapsedMilliseconds
 ///
 /// sw.ElapsedMilliseconds is a wholesome choice here since it adjusts for machine/OS-specific timing.
 /// </summary>
 public StopwatchHelper(InstrumentationAPI i) : base(i)
 {
 }
示例#5
0
 public MeasurementHandler(InstrumentationAPI i)
 {
     instrumentationSource = i;
 }
示例#6
0
 public SnapshotHandler(InstrumentationAPI i)
 {
     instrumentationSource = i;
 }
示例#7
0
 public InstrumentationHelper(InstrumentationAPI instrumentation)
 {
     instrumentationAPI = instrumentation;
 }
示例#8
0
 public DelayHandler(InstrumentationAPI i)
 {
     instrumentationSource = i;
 }
示例#9
0
 public SnapshotLocalValueHelper(InstrumentationAPI i, string fieldName) : base(i)
 {
     snapshotFieldName = fieldName;
 }
示例#10
0
 public SleepHelper(InstrumentationAPI i, int sleepSeconds) : base(i)
 {
     nSecondsSleep = sleepSeconds;
 }