Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F10615121
statistics.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
947 B
Subscribers
None
statistics.h
View Options
// Copyright (c) 2023 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_AVALANCHE_STATISTICS_H
#define BITCOIN_AVALANCHE_STATISTICS_H
#include
<chrono>
/** Refresh period for the avalanche statistics computation */
static
constexpr
std
::
chrono
::
minutes
AVALANCHE_STATISTICS_REFRESH_PERIOD
{
10
};
/** Time constant for the avalanche statistics computation */
static
constexpr
std
::
chrono
::
minutes
AVALANCHE_STATISTICS_TIME_CONSTANT
{
10
};
/**
* Pre-computed decay factor for the avalanche statistics computation.
* There is currently no constexpr variant of std::exp, so use a const.
*/
static
const
double
AVALANCHE_STATISTICS_DECAY_FACTOR
=
1.
-
std
::
exp
(
-1.
*
AVALANCHE_STATISTICS_REFRESH_PERIOD
.
count
()
/
AVALANCHE_STATISTICS_TIME_CONSTANT
.
count
());
#endif
// BITCOIN_AVALANCHE_STATISTICS_H
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sat, Nov 23, 09:58 (1 d, 16 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4512322
Default Alt Text
statistics.h (947 B)
Attached To
rSTAGING Bitcoin ABC staging
Event Timeline
Log In to Comment