@@ -57,6 +57,23 @@ int64_t get_norm_iops(const int64_t size, const double iops, const ObIOMode mode
57
57
}
58
58
return norm_iops;
59
59
}
60
+
61
+ // for local device
62
+ int64_t get_norm_bw (const int64_t size, const ObIOMode mode)
63
+ {
64
+ int ret = OB_SUCCESS;
65
+ int64_t norm_bw = size;
66
+ double iops_scale = 0 ;
67
+ bool is_io_ability_valid = false ;
68
+ if (mode == ObIOMode::MAX_MODE) {
69
+ } else if (FALSE_IT (ObIOCalibration::get_instance ().get_iops_scale (mode, size, iops_scale, is_io_ability_valid))) {
70
+ } else if (iops_scale < std::numeric_limits<double >::epsilon ()) {
71
+ LOG_WARN (" calc iops scale failed" , K (ret), K (mode));
72
+ } else {
73
+ norm_bw = static_cast <int64_t >((double )STANDARD_IOPS_SIZE / iops_scale);
74
+ }
75
+ return max (norm_bw, 1 );;
76
+ }
60
77
} // namespace common
61
78
} // namespace oceanbase
62
79
int64_t ObTrafficControl::IORecord::calc ()
@@ -2695,7 +2712,7 @@ int ObTenantIOManager::print_io_status()
2695
2712
snprintf (io_status, sizeof (io_status),
2696
2713
" sys_group_name:%s, mode:%s, cur_req:%ld, hold_mem:%ld "
2697
2714
" [FAILED]: fail_size:%ld, fail_iops:%ld, fail_bw:%ld, [delay/us]:prepare:%ld, schedule:%ld, submit:%ld, rt:%ld, total:%ld, "
2698
- " [SUCC]: size:%ld, iops:%ld, norm_iops :%ld, bw:%ld, [delay/us]:prepare:%ld, schedule:%ld, submit:%ld, rt:%ld, total:%ld" ,
2715
+ " [SUCC]: size:%ld, iops:%ld, norm_iops:%ld, bw:%ld, [delay/us]:prepare:%ld, schedule:%ld, submit:%ld, rt:%ld, total:%ld" ,
2699
2716
get_io_sys_group_name (module),
2700
2717
mode_str,
2701
2718
sys_mem_stat.group_mem_infos_ .at (i).total_cnt_ ,
0 commit comments