コード例 #1
0
ファイル: LeveldbCoindb.cs プロジェクト: oumarxy/blockcore
        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;
            }
        }
コード例 #3
0
        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);
        }