You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

speed_stats_step.go 809 B

1234567891011121314151617181920212223242526272829303132
  1. package ticktock
  2. import (
  3. "time"
  4. "gitlink.org.cn/cloudream/common/pkgs/logger"
  5. "gitlink.org.cn/cloudream/common/utils/reflect2"
  6. )
  7. type SpeedStatsStep struct {
  8. }
  9. func (j *SpeedStatsStep) Name() string {
  10. return reflect2.TypeNameOf[SpeedStatsStep]()
  11. }
  12. func (j *SpeedStatsStep) Execute(t *TickTock) {
  13. log := logger.WithType[SpeedStatsStep]("Event")
  14. startTime := time.Now()
  15. log.Infof("job start")
  16. defer func() {
  17. log.Infof("job end, time: %v", time.Since(startTime))
  18. }()
  19. t.speedStats.Step()
  20. status := t.speedStats.DumpStatus()
  21. log.Infof("100M: %f, %f; 1G: %f, %f; Above1G: %f, %f\n",
  22. status.Below100M[0].AvarageSpeed, status.Below100M[1].AvarageSpeed,
  23. status.Below1G[0].AvarageSpeed, status.Below1G[1].AvarageSpeed,
  24. status.Above1G[0].AvarageSpeed, status.Above1G[1].AvarageSpeed,
  25. )
  26. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。