Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::TemporaryFileCompressionAdaptivity Class Reference
Collaboration diagram for duckdb::TemporaryFileCompressionAdaptivity:

Public Member Functions

TemporaryCompressionLevel GetCompressionLevel ()
 Get the compression level to use based on current write times.
 
void Update (TemporaryCompressionLevel level, int64_t time_before_ns)
 Update write time for given compression level.
 

Static Public Member Functions

static int64_t GetCurrentTimeNanos ()
 Get current time in nanoseconds to measure write times.
 

Static Private Member Functions

static TemporaryCompressionLevel IndexToLevel (idx_t index)
 Convert from level to index into write time array and back.
 
static idx_t LevelToIndex (TemporaryCompressionLevel level)
 
static TemporaryCompressionLevel MinimumCompressionLevel ()
 Min/max compression levels.
 
static TemporaryCompressionLevel MaximumCompressionLevel ()
 

Private Attributes

RandomEngine random_engine
 Random engine to (sometimes) randomize compression.
 
int64_t last_uncompressed_write_ns
 Duration of the last uncompressed write.
 
int64_t last_compressed_writes_ns [LEVELS]
 Duration of the last compressed writes.
 

Static Private Attributes

static constexpr int64_t INITIAL_NS = 50000
 The value to initialize the atomic write counters to.
 
static constexpr idx_t LEVELS = 6
 How many compression levels we adapt between.
 
static constexpr double DURATION_RATIO_THRESHOLD = 2.0
 Bias towards compressed writes: we only choose uncompressed if it is more than 2x faster than compressed.
 
static constexpr double COMPRESSION_DEVIATION = 0.5
 Probability to deviate from the current best write behavior (1 in 20)
 
static constexpr int64_t WEIGHT = 16
 Weight to use for moving weighted average.
 

The documentation for this class was generated from the following file: