Skip to content

Commit

Permalink
✨ v4.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
AirportR committed Sep 6, 2024
1 parent d4d41e8 commit 3b1ab13
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
9 changes: 2 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
miaospeed v4.5.0
miaospeed v4.5.1

1. 将一些任务队列里的变量改成原子变量
2. 提供不是并发安全的用来获取当前任务队列大概长度的方法
3. 更详细的显示日志信息
4. 新的Matrix: TEST_HTTP_CODE HTTPing的响应状态码
5. 新的Matrix: TEST_PING_TOTAL_RTT 本次节点测试的所有rtt数值
6. 新的Matrix: TEST_PING_TOTAL_CONN 本次节点测试的所有http延迟数值
1. tasklimit 启动参数仅对测速队列生效
18 changes: 9 additions & 9 deletions service/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,18 @@ func InitServer() {
return
}
poll = SpeedTaskPoll
awaitingCount := uint(poll.UnsafeAwaitingCount())
if awaitingCount > utils.GCFG.TaskLimit {
_ = conn.WriteJSON(&interfaces.SlaveResponse{
Error: fmt.Sprintf("too many tasks are waiting, please try later, current queuing=%d", awaitingCount),
})
return
}
} else {
poll = ConnTaskPoll
}

awaitingCount := uint(poll.UnsafeAwaitingCount())
if awaitingCount > utils.GCFG.TaskLimit {
_ = conn.WriteJSON(&interfaces.SlaveResponse{
Error: fmt.Sprintf("too many tasks are waiting, please try later, current queuing=%d", awaitingCount),
})
return
}
utils.DLogf("MiaoServer Test | Receive Task, name=%s poll=%s awaitingCount=%d", sr.Basics.ID, poll.Name(), awaitingCount)
utils.DLogf("MiaoServer Test | Receive Task, name=%s poll=%s", sr.Basics.ID, poll.Name())

// build testing item
item := poll.Push((&TestingPollItem{
Expand Down Expand Up @@ -190,7 +190,7 @@ func InitServer() {
ID: item.ID(),
MiaoSpeedVersion: utils.VERSION,
Progress: &interfaces.SlaveProgress{
Queuing: poll.AwaitingCount(),
Queuing: poll.UnsafeAwaitingCount(),
},
})
batches.Set(item.ID(), true)
Expand Down

0 comments on commit 3b1ab13

Please sign in to comment.