Example #1
0
        private long FieldIndexUsage(ClassMetadata classMetadata)
        {
            LongByRef usage = new LongByRef();

            classMetadata.TraverseDeclaredFields(new _IProcedure4_125(this, usage));
            return(usage.value);
        }
Example #2
0
        /// <returns>
        /// number of bytes used aggregated from all categories - should always be equal to
        /// <see cref="FileSize()">FileSize()</see>
        /// </returns>
        public virtual long TotalUsage()
        {
            LongByRef total = new LongByRef(_fileHeader + _freespace + _idSystem + _classMetadata
                                            + _freespaceUsage + _uuidUsage + _commitTimestampUsage);

            Tree.Traverse(_classUsageStats, new _IVisitor4_98(total));
            return(total.value);
        }
Example #3
0
 public _IVisitor4_166(FileUsageStatsCollector _enclosing, LongByRef slotUsage, IMiscCollector
                       miscCollector, LongByRef miscUsage)
 {
     this._enclosing    = _enclosing;
     this.slotUsage     = slotUsage;
     this.miscCollector = miscCollector;
     this.miscUsage     = miscUsage;
 }
 public _IVisitor4_167(FileUsageStatsCollector _enclosing, IntByRef numInstances,
                       LongByRef slotUsage, IMiscCollector miscCollector, LongByRef miscUsage)
 {
     this._enclosing    = _enclosing;
     this.numInstances  = numInstances;
     this.slotUsage     = slotUsage;
     this.miscCollector = miscCollector;
     this.miscUsage     = miscUsage;
 }
Example #5
0
        private FileUsageStatsCollector.InstanceUsage ClassSlotUsage(ClassMetadata clazz)
        {
            if (!clazz.HasClassIndex())
            {
                return(new FileUsageStatsCollector.InstanceUsage(0, 0));
            }
            IMiscCollector          miscCollector = ((IMiscCollector)MiscCollectors[clazz.GetName()]);
            LongByRef               slotUsage     = new LongByRef();
            LongByRef               miscUsage     = new LongByRef();
            BTreeClassIndexStrategy index         = (BTreeClassIndexStrategy)clazz.Index();

            index.TraverseAll(_db.SystemTransaction(), new _IVisitor4_166(this, slotUsage, miscCollector
                                                                          , miscUsage));
            return(new FileUsageStatsCollector.InstanceUsage(slotUsage.value, miscUsage.value
                                                             ));
        }
Example #6
0
 public _IVisitor4_98(LongByRef total)
 {
     this.total = total;
 }
Example #7
0
 public _IProcedure4_125(FileUsageStatsCollector _enclosing, LongByRef usage)
 {
     this._enclosing = _enclosing;
     this.usage      = usage;
 }