some change

This commit is contained in:
xiongguangjie
2022-06-03 17:49:43 +08:00
parent 9fadc22c80
commit ddc5b59a65
3 changed files with 38 additions and 21 deletions

View File

@@ -41,9 +41,14 @@ uint32_t EstimatedLinkCapacityContext::getEstimatedLinkCapacity() {
}
std::sort(tmp.begin(),tmp.end());
if(tmp.empty()){
return 0;
return 1000;
}
if(tmp.size()<16){
return 1000;
}
return 1000;
double dur =DurationCountMicroseconds(tmp[tmp.size()/2])/1e6;
return (uint32_t)(1.0/dur);