Commit 96389e4a authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #347 from iovisor/nits

lhist: interval notation tweak
parents 37bb3893 43e7974f
......@@ -1162,10 +1162,6 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
if (max_index == -1)
return 0;
std::ostringstream lt;
lt << "(...," << lhist_index_label(min) << "]";
std::ostringstream gt;
// trim empty values
int start_value = -1;
int end_value = 0;
......@@ -1190,9 +1186,9 @@ int BPFtrace::print_lhist(const std::vector<uint64_t> &values, int min, int max,
int bar_width = values.at(i)/(float)max_value*max_width;
std::ostringstream header;
if (i == 0) {
header << "(...," << lhist_index_label(min) << "]";
header << "(..., " << lhist_index_label(min) << ")";
} else if (i == (buckets + 1)) {
header << "[" << lhist_index_label(max) << ",...)";
header << "[" << lhist_index_label(max) << ", ...)";
} else {
header << "[" << lhist_index_label((i - 1) * step + min);
header << ", " << lhist_index_label(i * step + min) << ")";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment