示例#1
0
 private static CounterCreationData[] CreationDataFor(PerformanceCounterSpec[] performanceCounterSpecs)
 {
     var creationData = new CounterCreationData[performanceCounterSpecs.Length];
     for (var i = 0; i < performanceCounterSpecs.Length; i++)
     {
         creationData[i] = performanceCounterSpecs[i].CounterCreationData();
     }
     return creationData;
 }
        public static void Install()
        {
            if (CategoryExists())
            {
                return;
            }

            CounterCreationData[]         creationData = CreationDataFor(PerformanceCounterSpec.All());
            CounterCreationDataCollection collection   = new CounterCreationDataCollection(creationData);

            PerformanceCounterCategory.Create(CategoryName, "Db4o Performance Counters", PerformanceCounterCategoryType.MultiInstance, collection);
        }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container)
 {
     return(NewDb4oCounter(spec.Id, container.ToString(), true));
 }
 internal static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container, bool readOnly)
 {
     return(NewDb4oCounter(spec.Id, container.ToString(), readOnly));
 }
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, bool readOnly)
 {
     return(CounterFor(spec, My <IObjectContainer> .Instance, readOnly));
 }
示例#6
0
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container)
 {
     return NewDb4oCounter(spec.Id, container.ToString(), true);
 }
示例#7
0
 internal static PerformanceCounter CounterFor(PerformanceCounterSpec spec, IObjectContainer container,
     bool readOnly)
 {
     return NewDb4oCounter(spec.Id, container.ToString(), readOnly);
 }
示例#8
0
 public static PerformanceCounter CounterFor(PerformanceCounterSpec spec, bool readOnly)
 {
     return CounterFor(spec, My<IObjectContainer>.Instance, readOnly);
 }