Skip to content

Commit

Permalink
Move some stderr messages to stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykorean committed Jan 29, 2024
1 parent 8829ba9 commit 0e61e64
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions db_stress_tool/db_stress_common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void CompressedCacheSetCapacityThread(void* v) {
// Lower by upto 50% of usable block cache capacity
adjustment = (adjustment * thread->rand.Uniform(50)) / 100;
block_cache->SetCapacity(capacity - adjustment);
fprintf(stderr, "New cache capacity = %lu\n",
fprintf(stdout, "New cache capacity = %lu\n",
block_cache->GetCapacity());
db_stress_env->SleepForMicroseconds(10 * 1000 * 1000);
block_cache->SetCapacity(capacity);
Expand All @@ -210,7 +210,7 @@ void CompressedCacheSetCapacityThread(void* v) {
(double)thread->rand.Uniform(
FLAGS_compressed_secondary_cache_ratio * 100) /
100;
fprintf(stderr, "New comp cache ratio = %f\n", new_comp_cache_ratio);
fprintf(stdout, "New comp cache ratio = %f\n", new_comp_cache_ratio);

s = UpdateTieredCache(block_cache, /*capacity*/ -1,
new_comp_cache_ratio);
Expand Down
16 changes: 8 additions & 8 deletions db_stress_tool/db_stress_test_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2701,7 +2701,7 @@ void StressTest::Open(SharedState* shared, bool reopen) {
exit(1);
}
if (FLAGS_prefix_size != 0 && FLAGS_rep_factory != kHashSkipList) {
fprintf(stderr,
fprintf(stdout,
"WARNING: prefix_size is non-zero but "
"memtablerep != prefix_hash\n");
}
Expand Down Expand Up @@ -2770,17 +2770,17 @@ void StressTest::Open(SharedState* shared, bool reopen) {
std::sort(existing_column_families.begin(),
existing_column_families.end());
if (sorted_cfn != existing_column_families) {
fprintf(stderr, "Expected column families differ from the existing:\n");
fprintf(stderr, "Expected: {");
fprintf(stdout, "Expected column families differ from the existing:\n");
fprintf(stdout, "Expected: {");
for (const auto& cf : sorted_cfn) {
fprintf(stderr, "%s ", cf.c_str());
fprintf(stdout, "%s ", cf.c_str());
}
fprintf(stderr, "}\n");
fprintf(stderr, "Existing: {");
fprintf(stdout, "}\n");
fprintf(stdout, "Existing: {");
for (const auto& cf : existing_column_families) {
fprintf(stderr, "%s ", cf.c_str());
fprintf(stdout, "%s ", cf.c_str());
}
fprintf(stderr, "}\n");
fprintf(stdout, "}\n");
}
assert(sorted_cfn == existing_column_families);
}
Expand Down

0 comments on commit 0e61e64

Please sign in to comment.