Index: base/histogram.cc |
diff --git a/base/histogram.cc b/base/histogram.cc |
index 3d2cd9e97bb28f7d7db1b9fd335e22db789b9ad5..55af96dec994bd1ff27887acfe8313140e53a541 100644 |
--- a/base/histogram.cc |
+++ b/base/histogram.cc |
@@ -124,7 +124,10 @@ void Histogram::WriteAscii(bool graph_it, const std::string& newline, |
if (!current && !PrintEmptyBucket(i)) |
continue; |
remaining -= current; |
- StringAppendF(output, "%#*s ", print_width, GetAsciiBucketRange(i).c_str()); |
+ std::string range = GetAsciiBucketRange(i); |
+ output->append(range); |
+ for (size_t j = 0; range.size() + j < print_width + 1; ++j) |
+ output->push_back(' '); |
if (0 == current && i < bucket_count() - 1 && 0 == snapshot.counts(i + 1)) { |
while (i < bucket_count() - 1 && 0 == snapshot.counts(i + 1)) |
++i; |
@@ -287,7 +290,7 @@ void Histogram::WriteAsciiHeader(const SampleSet& snapshot, |
Count sample_count, |
std::string* output) const { |
StringAppendF(output, |
- "Histogram: %s recorded %ld samples", |
+ "Histogram: %s recorded %d samples", |
histogram_name().c_str(), |
sample_count); |
if (0 == sample_count) { |