9 uint64_t min_num_microslices = UINT64_MAX;
10 uint64_t max_num_microslices = 0;
11 uint64_t total_num_microslices = 0;
12 uint64_t min_microslice_size = UINT64_MAX;
13 uint64_t max_microslice_size = 0;
14 uint64_t total_microslice_size = 0;
16 size_t nbComps = ts.num_components();
17 size_t nbMicroslicesCore = ts.num_core_microslices();
18 for (uint64_t compIdx = 0; compIdx < nbComps; ++compIdx) {
19 uint64_t num_microslices = ts.num_microslices(compIdx);
20 min_num_microslices =
std::min(min_num_microslices, num_microslices);
21 max_num_microslices =
std::max(max_num_microslices, num_microslices);
22 total_num_microslices += num_microslices;
23 for (uint64_t msIdx = 0; msIdx < num_microslices; ++msIdx) {
24 uint64_t size = ts.descriptor(compIdx, msIdx).size;
25 total_microslice_size += size;
26 min_microslice_size =
std::min(min_microslice_size, size);
27 max_microslice_size =
std::max(max_microslice_size, size);
31 uint64_t min_overlap = min_num_microslices - nbMicroslicesCore;
32 uint64_t max_overlap = max_num_microslices - nbMicroslicesCore;
34 ss <<
"Timeslice " << std::setw(6) << ts.index() <<
" with " << std::setw(3)
35 << nbComps <<
" components "
36 <<
" x " << std::setw(6) << nbMicroslicesCore <<
" core microslices";
39 if (min_overlap != max_overlap) {
40 ss << std::setw(3) << min_overlap << std::setw(3) <<
".." << max_overlap;
43 ss << std::setw(3) << min_overlap;
45 ss <<
" overlap) = " << std::setw(9) << total_num_microslices << std::endl;
47 <<
"\tmicroslice size min/avg/max: " << std::setw(6)
48 << min_microslice_size <<
" / " << std::fixed << std::setprecision(0)
50 << (
static_cast<double>(total_microslice_size) / total_num_microslices)
52 << std::setprecision(6)
53 <<
" / " << std::setw(6) << max_microslice_size <<
" bytes" << std::endl;
63 size_t nbComps = ts.num_components();
65 size_t nbMicroslicesCore = ts.num_core_microslices();
66 size_t nbMicroslicesOverlap =
67 ts.num_microslices(0) - ts.num_core_microslices();
69 for (
size_t compIdx = 0; compIdx < nbComps; ++compIdx) {
70 ss <<
"Core Microslices for component " << std::setw(3) << compIdx
72 for (
size_t msIdx = 0; msIdx < nbMicroslicesCore; ++msIdx) {
73 ss << ts.descriptor(compIdx, msIdx);
75 ss <<
"----------------------------------------------" << std::endl;
77 ss <<
"Overlap Microslices for component " << std::setw(3) << compIdx
79 for (
size_t msIdx = 0; msIdx < nbMicroslicesOverlap; ++msIdx) {
80 ss << ts.descriptor(compIdx, msIdx + nbMicroslicesCore);
82 ss <<
"----------------------------------------------" << std::endl;
86 ss <<
"**********************************************" << std::endl;
91 std::ostream&
operator<<(std::ostream& os,
const fles::Timeslice& ts) {
94 size_t nbComps = ts.num_components();
95 size_t nbMicroslicesCore = ts.num_core_microslices();
96 size_t nbMicroslicesOverlap =
97 ts.num_microslices(0) - ts.num_core_microslices();
99 for (
size_t compIdx = 0; compIdx < nbComps; ++compIdx) {
100 os <<
"Core Microslices for component " << std::setw(3) << compIdx
102 for (
size_t msIdx = 0; msIdx < nbMicroslicesCore; ++msIdx) {
103 os << ts.descriptor(compIdx, msIdx);
105 os <<
"----------------------------------------------" << std::endl;
107 os <<
"Overlap Microslices for component " << std::setw(3) << compIdx
109 for (
size_t msIdx = 0; msIdx < nbMicroslicesOverlap; ++msIdx) {
110 os << ts.descriptor(compIdx, msIdx + nbMicroslicesCore);
112 os <<
"----------------------------------------------" << std::endl;
115 os <<
"**********************************************" << std::endl;