예제 #1
0
        private void AddBenchStats(StringBuilder log)
        {
            log.AppendLine("======Leveldb Bench======");

            BackendPerformanceSnapshot snapShot = this.performanceCounter.Snapshot();

            if (this.latestPerformanceSnapShot == null)
            {
                log.AppendLine(snapShot.ToString());
            }
            else
            {
                log.AppendLine((snapShot - this.latestPerformanceSnapShot).ToString());
            }

            this.latestPerformanceSnapShot = snapShot;
        }
예제 #2
0
        private void AddBenchStats(StringBuilder benchLog)
        {
            if (this.TipHashHeight != null)
            {
                benchLog.AppendLine("======ProvenBlockHeaderStore Bench======");

                BackendPerformanceSnapshot snapShot = this.performanceCounter.Snapshot();

                if (this.latestPerformanceSnapShot == null)
                {
                    benchLog.AppendLine(snapShot.ToString());
                }
                else
                {
                    benchLog.AppendLine((snapShot - this.latestPerformanceSnapShot).ToString());
                }

                this.latestPerformanceSnapShot = snapShot;
            }
        }
        private void AddBenchStats(StringBuilder benchLog)
        {
            if (this.storeTip != null)
            {
                benchLog.AppendLine("======ProvenBlockHeaderStore Bench======");

                BackendPerformanceSnapshot snapShot = this.performanceCounter.Snapshot();

                if (this.latestPerformanceSnapShot == null)
                {
                    benchLog.AppendLine(snapShot.ToString());
                }
                else
                {
                    benchLog.AppendLine((snapShot - this.latestPerformanceSnapShot).ToString());
                }

                this.latestPerformanceSnapShot = snapShot;
            }

            this.PendingBatch.Sum(p => p.Value.HeaderSize);
        }