MCPcopy Create free account
hub / github.com/apple/foundationdb / initialize

Method initialize

flow/Knobs.cpp:40–307  ·  view source on GitHub ↗

clang-format off

Source from the content-addressed store, hash-verified

38
39// clang-format off
40void FlowKnobs::initialize(Randomize randomize, IsSimulated isSimulated) {
41 init( AUTOMATIC_TRACE_DUMP, 1 );
42 init( PREVENT_FAST_SPIN_DELAY, .01 );
43 init( HOSTNAME_RESOLVE_INIT_INTERVAL, .05 );
44 init( HOSTNAME_RESOLVE_MAX_INTERVAL, 1.0 );
45 init( HOSTNAME_RECONNECT_INIT_INTERVAL, .05 );
46 init( HOSTNAME_RECONNECT_MAX_INTERVAL, 1.0 );
47 init( ENABLE_COORDINATOR_DNS_CACHE, false ); if( randomize && BUGGIFY ) ENABLE_COORDINATOR_DNS_CACHE = true;
48 init( CACHE_REFRESH_INTERVAL_WHEN_ALL_ALTERNATIVES_FAILED, 1.0 );
49
50 init( DELAY_JITTER_OFFSET, 0.9 );
51 init( DELAY_JITTER_RANGE, 0.2 );
52 init( BUSY_WAIT_THRESHOLD, 0 ); // 1e100 == never sleep
53 init( CLIENT_REQUEST_INTERVAL, 1.0 ); if( randomize && BUGGIFY ) CLIENT_REQUEST_INTERVAL = 2.0;
54 init( SERVER_REQUEST_INTERVAL, 1.0 ); if( randomize && BUGGIFY ) SERVER_REQUEST_INTERVAL = 2.0;
55
56 init( REACTOR_FLAGS, 0 );
57
58 init( DISABLE_ASSERTS, 0 );
59 init( QUEUE_MODEL_SMOOTHING_AMOUNT, 2.0 );
60
61 init( RUN_LOOP_PROFILING_INTERVAL, 0.125 ); // A value of 0 disables run loop profiling
62 init( SLOWTASK_PROFILING_LOG_INTERVAL, 0 ); // A value of 0 means use RUN_LOOP_PROFILING_INTERVAL
63 init( SLOWTASK_PROFILING_MAX_LOG_INTERVAL, 1.0 );
64 init( SLOWTASK_PROFILING_LOG_BACKOFF, 2.0 );
65 init( SLOWTASK_BLOCKED_INTERVAL, 60.0 );
66 init( SATURATION_PROFILING_LOG_INTERVAL, 0.5 ); // A value of 0 means use RUN_LOOP_PROFILING_INTERVAL
67 init( SATURATION_PROFILING_MAX_LOG_INTERVAL, 5.0 );
68 init( SATURATION_PROFILING_LOG_BACKOFF, 2.0 );
69
70 init( RANDOMSEED_RETRY_LIMIT, 4 );
71 init( FAST_ALLOC_LOGGING_BYTES, 10e6 );
72 init( FAST_ALLOC_ALLOW_GUARD_PAGES, false );
73 init( HUGE_ARENA_LOGGING_BYTES, 100e6 );
74 init( HUGE_ARENA_LOGGING_INTERVAL, 5.0 );
75
76 init( MEMORY_USAGE_CHECK_INTERVAL, 1.0 );
77
78 // Chaos testing - enabled for simulation by default
79 init( ENABLE_CHAOS_FEATURES, isSimulated );
80 init( CHAOS_LOGGING_INTERVAL, 5.0 );
81
82
83 init( WRITE_TRACING_ENABLED, true ); if( randomize && BUGGIFY ) WRITE_TRACING_ENABLED = false;
84 init( TRACING_SPAN_ATTRIBUTES_ENABLED, false ); // Additional K/V and tenant data added to Span Attributes
85 init( TRACING_SAMPLE_RATE, 0.0 ); // Fraction of distributed traces (not spans) to sample (0 means ignore all traces)
86 init( TRACING_UDP_LISTENER_ADDR, "127.0.0.1" ); // Only applicable if TracerType is set to a network option
87 init( TRACING_UDP_LISTENER_PORT, 8889 ); // Only applicable if TracerType is set to a network option
88
89 //connectionMonitor
90 init( CONNECTION_MONITOR_LOOP_TIME, isSimulated ? 0.75 : 1.0 ); if( randomize && BUGGIFY ) CONNECTION_MONITOR_LOOP_TIME = 6.0;
91 init( CONNECTION_MONITOR_TIMEOUT, isSimulated ? 1.50 : 2.0 ); if( randomize && BUGGIFY ) CONNECTION_MONITOR_TIMEOUT = 6.0;
92 init( CONNECTION_MONITOR_IDLE_TIMEOUT, 180.0 ); if( randomize && BUGGIFY ) CONNECTION_MONITOR_IDLE_TIMEOUT = 5.0;
93 init( CONNECTION_MONITOR_INCOMING_IDLE_MULTIPLIER, 1.2 );
94 init( CONNECTION_MONITOR_UNREFERENCED_CLOSE_DELAY, 2.0 );
95
96 //FlowTransport
97 init( CONNECTION_REJECTED_MESSAGE_DELAY, 1.0 );

Callers 1

resetMethod · 0.45

Calls 5

deterministicRandomFunction · 0.85
logFunction · 0.85
random01Method · 0.80
initFunction · 0.70
randomIntMethod · 0.45

Tested by

no test coverage detected