Home
last modified time | relevance | path

Searched refs:rand (Results 1 – 25 of 38) sorted by relevance

12

/rocksdb-6.9/java/src/test/java/org/rocksdb/
DOptionsTest.java30 origOpts.setNumLevels(rand.nextInt(8)); in copyConstructor()
59 final int intValue = rand.nextInt(); in maxWriteBufferNumber()
68 final int intValue = rand.nextInt(); in minWriteBufferNumberToMerge()
77 final int intValue = rand.nextInt(); in numLevels()
86 final int intValue = rand.nextInt(); in levelZeroFileNumCompactionTrigger()
95 final int intValue = rand.nextInt(); in levelZeroSlowdownWritesTrigger()
104 final int intValue = rand.nextInt(); in levelZeroStopWritesTrigger()
122 final int intValue = rand.nextInt(); in targetFileSizeMultiplier()
197 final int intValue = rand.nextInt(); in level0FileNumCompactionTrigger()
1137 long longValue = rand.nextLong(); in maxTableFilesSizeFIFO()
[all …]
DDBOptionsTest.java29 origOpts.setAllow2pc(rand.nextBoolean()); in copyConstructor()
151 final int intValue = rand.nextInt(); in maxOpenFiles()
160 final int intValue = rand.nextInt(); in maxFileOpeningThreads()
222 final int intValue = rand.nextInt(); in baseBackgroundCompactions()
233 final int intValue = rand.nextInt(); in maxBackgroundCompactions()
242 final int intValue = rand.nextInt(); in maxSubcompactions()
253 final int intValue = rand.nextInt(); in maxBackgroundFlushes()
262 final int intValue = rand.nextInt(); in maxBackgroundJobs()
316 final int intValue = rand.nextInt(); in tableCacheNumshardbits()
406 final int intValue = rand.nextInt(); in statsDumpPeriodSec()
[all …]
DColumnFamilyOptionsTest.java31 origOpts.setNumLevels(rand.nextInt(8)); in copyConstructor()
97 final int intValue = rand.nextInt(); in maxWriteBufferNumber()
106 final int intValue = rand.nextInt(); in minWriteBufferNumberToMerge()
115 final int intValue = rand.nextInt(); in numLevels()
124 final int intValue = rand.nextInt(); in levelZeroFileNumCompactionTrigger()
133 final int intValue = rand.nextInt(); in levelZeroSlowdownWritesTrigger()
142 final int intValue = rand.nextInt(); in levelZeroStopWritesTrigger()
160 final int intValue = rand.nextInt(); in targetFileSizeMultiplier()
235 final int intValue = rand.nextInt(); in level0FileNumCompactionTrigger()
517 long longValue = rand.nextLong(); in maxTableFilesSizeFIFO()
[all …]
DEnvOptionsTest.java36 final boolean boolValue = rand.nextBoolean(); in useMmapReads()
45 final boolean boolValue = rand.nextBoolean(); in useMmapWrites()
54 final boolean boolValue = rand.nextBoolean(); in useDirectReads()
63 final boolean boolValue = rand.nextBoolean(); in useDirectWrites()
72 final boolean boolValue = rand.nextBoolean(); in allowFallocate()
81 final boolean boolValue = rand.nextBoolean(); in setFdCloexecs()
90 final long longValue = rand.nextLong(); in bytesPerSync()
99 final boolean boolValue = rand.nextBoolean(); in fallocateWithKeepSize()
108 final int intValue = rand.nextInt(); in compactionReadaheadSize()
117 final int intValue = rand.nextInt(); in randomAccessMaxBufferSize()
[all …]
DIngestExternalFileOptionsTest.java20 public static final Random rand = field in IngestExternalFileOptionsTest
33 final boolean moveFiles = rand.nextBoolean(); in createExternalSstFileInfoWithParameters()
34 final boolean snapshotConsistency = rand.nextBoolean(); in createExternalSstFileInfoWithParameters()
35 final boolean allowGlobalSeqNo = rand.nextBoolean(); in createExternalSstFileInfoWithParameters()
36 final boolean allowBlockingFlush = rand.nextBoolean(); in createExternalSstFileInfoWithParameters()
52 final boolean moveFiles = rand.nextBoolean(); in moveFiles()
62 final boolean snapshotConsistency = rand.nextBoolean(); in snapshotConsistency()
72 final boolean allowGlobalSeqNo = rand.nextBoolean(); in allowGlobalSeqNo()
82 final boolean allowBlockingFlush = rand.nextBoolean(); in allowBlockingFlush()
DTransactionOptionsTest.java16 private static final Random rand = PlatformRandomHelper. field in TransactionOptionsTest
22 final boolean boolValue = rand.nextBoolean(); in snapshot()
31 final boolean boolValue = rand.nextBoolean(); in deadlockDetect()
40 final long longValue = rand.nextLong(); in lockTimeout()
49 final long longValue = rand.nextLong(); in expiration()
58 final long longValue = rand.nextLong(); in deadlockDetectDepth()
67 final long longValue = rand.nextLong(); in maxWriteBatchSize()
DReadOptionsTest.java54 final Random rand = new Random(); in verifyChecksum() local
55 final boolean boolValue = rand.nextBoolean(); in verifyChecksum()
64 final Random rand = new Random(); in fillCache() local
65 final boolean boolValue = rand.nextBoolean(); in fillCache()
74 final Random rand = new Random(); in tailing() local
75 final boolean boolValue = rand.nextBoolean(); in tailing()
141 final Random rand = new Random(); in readaheadSize() local
142 final long longValue = rand.nextLong(); in readaheadSize()
311 final Random rand = new Random(); in buildRandomSlice() local
312 byte[] sliceBytes = new byte[rand.nextInt(100) + 1]; in buildRandomSlice()
[all …]
DBackupableDBOptionsTest.java29 public static final Random rand = PlatformRandomHelper. field in BackupableDBOptionsTest
60 final boolean value = rand.nextBoolean(); in shareTableFiles()
92 final boolean value = rand.nextBoolean(); in sync()
102 final boolean value = rand.nextBoolean(); in destroyOldData()
113 final boolean value = rand.nextBoolean(); in backupLogFiles()
124 final long value = Math.abs(rand.nextLong()); in backupRateLimit()
155 final long value = Math.abs(rand.nextLong()); in restoreRateLimit()
186 boolean value = rand.nextBoolean(); in shareFilesWithChecksum()
197 final int value = rand.nextInt(); in maxBackgroundOperations()
208 final long value = rand.nextLong(); in callbackTriggerIntervalSize()
DTransactionDBOptionsTest.java16 private static final Random rand = PlatformRandomHelper. field in TransactionDBOptionsTest
22 final long longValue = rand.nextLong(); in maxNumLocks()
31 final long longValue = rand.nextLong(); in maxNumStripes()
40 final long longValue = rand.nextLong(); in transactionLockTimeout()
49 final long longValue = rand.nextLong(); in defaultLockTimeout()
DWriteOptionsTest.java21 public static final Random rand = PlatformRandomHelper. field in WriteOptionsTest
59 origOpts.setDisableWAL(rand.nextBoolean()); in copyConstructor()
60 origOpts.setIgnoreMissingColumnFamilies(rand.nextBoolean()); in copyConstructor()
61 origOpts.setSync(rand.nextBoolean()); in copyConstructor()
DOptimisticTransactionOptionsTest.java17 private static final Random rand = PlatformRandomHelper. field in OptimisticTransactionOptionsTest
23 final boolean boolValue = rand.nextBoolean(); in setSnapshot()
DRocksDBTest.java27 public static final Random rand = PlatformRandomHelper. field in RocksDBTest
635 rand.nextBytes(b); in fullCompactRange()
676 rand.nextBytes(b); in fullCompactRangeColumnFamily()
710 rand.nextBytes(b); in compactRangeWithKeys()
738 rand.nextBytes(b); in compactRangeWithKeysReduce()
787 rand.nextBytes(b); in compactRangeWithKeysColumnFamily()
839 rand.nextBytes(b); in compactRangeWithKeysReduceColumnFamily()
892 rand.nextBytes(value); in compactRangeToLevel()
960 rand.nextBytes(value); in deleteFilesInRange()
1037 rand.nextBytes(value); in compactRangeToLevelColumnFamily()
/rocksdb-6.9/db_stress_tool/
Ddb_stress_common.cc103 thread->rand.Next() % (thread_pool_size_var * 2 + 1); in PoolSizeChangeThread()
111 thread->rand.Next() % FLAGS_compaction_thread_pool_adjust_interval * in PoolSizeChangeThread()
167 int64_t rand_seed = base_key + thread->rand.Next() % FLAGS_active_width; in GenerateOneKey()
172 (static_cast<double>(thread->rand.Next() % FLAGS_max_key)) / in GenerateOneKey()
193 int64_t next_key = base_key + thread->rand.Next() % FLAGS_active_width; in GenerateNKeys()
199 (static_cast<double>(thread->rand.Next() % FLAGS_max_key)) / in GenerateNKeys()
204 next_key = next_key + thread->rand.Next() % in GenerateNKeys()
212 size_t GenerateValue(uint32_t rand, char* v, size_t max_sz) { in GenerateValue() argument
214 ((rand % kRandomValueMaxFactor) + 1) * FLAGS_value_size_mult; in GenerateValue()
217 *((uint32_t*)v) = rand; in GenerateValue()
[all …]
Ddb_stress_test_base.cc783 if (thread->rand.OneIn(3)) { in GetWhiteBoxKeys()
824 if (thread->rand.OneIn(16)) { in TestIterate()
838 if (thread->rand.OneIn(16)) { in TestIterate()
849 if (thread->rand.OneIn(16)) { in TestIterate()
863 if (thread->rand.OneIn(16)) { in TestIterate()
1275 if (thread->rand.OneIn(2)) { in TestApproximateSize()
1295 if (thread->rand.OneIn(2)) { in TestApproximateSize()
1456 std::min(thread->rand.Uniform(25), thread->rand.Uniform(25)); in TestPauseBackground()
1566 if (thread->rand.OneIn(2)) { in TestCompactRange()
2013 if (rand.OneIn(2)) { in Open()
[all …]
Dno_batched_ops_stress.cc36 if (!thread->rand.OneIn(2)) { in VerifyDb()
105 if (thread->rand.OneInOpt(FLAGS_clear_column_family_one_in)) { in MaybeClearOneColumnFamily()
107 int cf = thread->rand.Next() % (FLAGS_column_families - 1) + 1; in MaybeClearOneColumnFamily()
200 if (thread->rand.OneIn(10)) { in TestMultiGet()
201 int op = thread->rand.Uniform(2); in TestMultiGet()
207 thread->rand.Next() % thread->shared->UNKNOWN_SENTINEL; in TestMultiGet()
276 if (GetNextPrefix(prefix, &upper_bound) && thread->rand.OneIn(2)) { in TestPrefixScan()
314 rand_key = thread->rand.Next() % max_key; in TestPut()
315 rand_column_family = thread->rand.Next() % FLAGS_column_families; in TestPut()
396 rand_key = thread->rand.Next() % max_key; in TestDelete()
[all …]
Dcf_consistency_stress.cc82 thread->rand.Next() % (max_key - FLAGS_range_deletion_width + 1); in TestDeleteRange()
124 if (thread->rand.OneIn(2)) { in TestGet()
127 column_families_[rand_column_families[thread->rand.Next() % in TestGet()
252 if (GetNextPrefix(prefix, &upper_bound) && thread->rand.OneIn(2)) { in TestPrefixScan()
257 column_families_[rand_column_families[thread->rand.Next() % in TestPrefixScan()
282 return column_families_[thread->rand.Next() % column_families_.size()]; in GetControlCfh()
Ddb_stress_shared_state.h366 Random rand; // Has different seeds for different threads member
387 : tid(index), rand(1000 + index + _shared->GetSeed()), shared(_shared) {} in ThreadState()
Dbatched_ops_stress.cc28 thread->rand.Next() % thread->shared->UNKNOWN_SENTINEL; in TestPut()
271 if (thread->rand.OneIn(2) && in TestPrefixScan()
/rocksdb-6.9/test_util/
Dtransaction_test_util.cc30 Random64* rand, const WriteOptions& write_options, in RandomTransactionInserter() argument
33 : rand_(rand), in RandomTransactionInserter()
281 bool take_snapshot, Random64* rand, in Verify() argument
313 num_keys_per_set != 0 && rand && rand->OneIn(10); in Verify()
Dtransaction_test_util.h41 Random64* rand, const WriteOptions& write_options = WriteOptions(),
82 bool take_snapshot = false, Random64* rand = nullptr,
Dfault_injection_test_fs.cc55 IOStatus FSFileState::DropRandomUnsyncedData(Random* rand) { in DropRandomUnsyncedData() argument
57 size_t truncated_size = static_cast<size_t>(rand->Uniform(range)); in DropRandomUnsyncedData()
/rocksdb-6.9/tools/
Ddb_bench_tool.cc2246 rand((FLAGS_seed ? FLAGS_seed : 1000) + index) { in ThreadState()
4325 return SelectDBWithCfh(thread->rand.Next()); in SelectDBWithCfh()
4404 size_t id = thread->rand.Next() % num_key_gens; in DoWrite()
5013 int64_t GetRandomKey(Random64* rand) { in GetRandomKey() argument
5014 uint64_t rand_int = rand->Next(); in GetRandomKey()
5039 int64_t key_rand = GetRandomKey(&thread->rand); in ReadRandom()
5055 key_rand = GetRandomKey(&thread->rand); in ReadRandom()
5064 key_rand = GetRandomKey(&thread->rand); in ReadRandom()
5129 int64_t key = GetRandomKey(&thread->rand); in MultiReadRandom()
5467 ini_rand = GetRandomKey(&thread->rand); in MixGraph()
[all …]
/rocksdb-6.9/utilities/persistent_cache/
Dhash_table_test.cc108 auto rand = Random64(time(nullptr)); in TEST_F() local
112 uint64_t k = rand.Next() % max_keys; in TEST_F()
/rocksdb-6.9/examples/
Dmulti_processes_example.cc129 size_t sz = 1 + (std::rand() % max_length); in GenerateRandomValue()
130 int rnd = std::rand(); in GenerateRandomValue()
300 Slice key = Key(std::rand() % kMaxKey); in RunSecondary()
/rocksdb-6.9/file/
Drandom_access_file_reader_test.cc107 Random rand(0); in TEST_F() local
109 test::RandomString(&rand, 3 * static_cast<int>(alignment()), &content); in TEST_F()

12