|
@@ -131,7 +131,7 @@ class chctl
|
|
|
$item = $pThis->mSpeedtable[$key];
|
|
|
|
|
|
$inPrice = $item->price();
|
|
|
- Log::record("max_price = {$max_inprice},in_price={$inPrice}",Log::DEBUG);
|
|
|
+// Log::record("max_price = {$max_inprice},in_price={$inPrice}",Log::DEBUG);
|
|
|
if ($max_inprice !== false && $inPrice > $max_inprice) {
|
|
|
continue;
|
|
|
} else {
|
|
@@ -139,7 +139,7 @@ class chctl
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
- Log::record("auto_match speed table key={$key} is empty.",Log::DEBUG);
|
|
|
+// Log::record("auto_match speed table key={$key} is empty.",Log::DEBUG);
|
|
|
}
|
|
|
}
|
|
|
return $ctls;
|
|
@@ -148,7 +148,6 @@ class chctl
|
|
|
|
|
|
$chooser = function ($ctl_items)
|
|
|
{
|
|
|
- $trace = new scope_trace(__METHOD__ . "speed_calc");
|
|
|
$usable_items = [];
|
|
|
foreach ($ctl_items as $item)
|
|
|
{
|
|
@@ -156,8 +155,8 @@ class chctl
|
|
|
$usable_items[] = $item;
|
|
|
$item->calc_speed(); //此处必须先计算速率,因为usort函数里面不能使用协程。
|
|
|
} else {
|
|
|
- $key = $item->prefix();
|
|
|
- Log::record("key={$key} has not opened",Log::DEBUG);
|
|
|
+// $key = $item->prefix();
|
|
|
+// Log::record("key={$key} has not opened",Log::DEBUG);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -209,7 +208,6 @@ class chctl
|
|
|
|
|
|
if(!empty($over_loads))
|
|
|
{
|
|
|
- $tracex = new scope_trace(__METHOD__ . " overload_assigner");
|
|
|
$assigner = new overload_assigner();
|
|
|
$assigner->add($over_loads);
|
|
|
$over_loads = $assigner->assign();
|
|
@@ -327,7 +325,7 @@ class chctl
|
|
|
[$count,$ratio] = $item->notify_ratio();
|
|
|
$lazy_spped = $item->lazy_speed();
|
|
|
|
|
|
- Log::record("auto_match channel {$name} count = {$count} ratio={$ratio} speed={$lazy_spped}",Log::DEBUG);
|
|
|
+// Log::record("auto_match channel {$name} count = {$count} ratio={$ratio} speed={$lazy_spped}",Log::DEBUG);
|
|
|
if($lazy_spped < self::feed_minorder) {
|
|
|
$feeds[] = $item;
|
|
|
} else {
|
|
@@ -365,7 +363,7 @@ class chctl
|
|
|
$state = 'profit';
|
|
|
}
|
|
|
|
|
|
- Log::record("auto_match channel {$name} state={$state} comit_succ={$commit_succ} count={$comit_count} notify_count={$notify_count} notify_succ={$notify_succ} speed={$speed}", Log::DEBUG);
|
|
|
+// Log::record("auto_match channel {$name} state={$state} comit_succ={$commit_succ} count={$comit_count} notify_count={$notify_count} notify_succ={$notify_succ} speed={$speed}", Log::DEBUG);
|
|
|
}
|
|
|
|
|
|
return [$feeds,$profits];
|
|
@@ -540,7 +538,7 @@ class chctl
|
|
|
foreach ($profits as $item)
|
|
|
{
|
|
|
if($item->speed_overload()) {
|
|
|
- Log::record("name={$item->name()} speed_overload",Log::DEBUG);
|
|
|
+// Log::record("name={$item->name()} speed_overload",Log::DEBUG);
|
|
|
$overloads[] = $item;
|
|
|
}
|
|
|
else {
|