Skip to content

拓展 chsrc measure 命令功能 #138

Open

Description

@happy-game

chsrc measure现有的功能为:

measure <target>          对该目标所有源测速
cesu    <target>          

目前该命令只支持对某个目标的所有源进行测速, 可以将该命令拓展为以下形式:

chsrc measure <target> [mirror1] [mirror2] ...

允许用户指定源并只针对指定源进行测速.

该功能有以下应用场景:

  1. 用户新找到一个源但不确定该源是否可用, 需要先测速再决定是否使用 chsrc set <target> <mirror>
  2. 开发者可以在不修改源码的情况下对 issues中其他用户提供的源测速确定其可用性
  3. 不熟悉chsrc代码但希望对 issues中其他用户提供的源测速并向开发者反馈意见

Activity

  1. changed the title [-]feat: 拓展 chsrc measure 命令功能[/-] [+]拓展 chsrc measure 命令功能[/+] on Dec 9, 2024
  2. added theissue type on Mar 3, 2025
  3. shiquda commented on Jun 11, 2025

    @shiquda

    有同样的需求,请问这个功能Dev最近打算开发吗?

  4. ccmywish commented on Jun 11, 2025

    @ccmywish
    Contributor

    @shiquda

    这个 issue 之所以拖延没有处理是因为,“用于测速的链接” 和 “换源的链接” 是不一样的。大多数用户只能找到换源链接,但是不会去找一个 “用于测速的链接”,到现在为止,很多 target 的测速链接都是空的,都是通过去测镜像站的其他文件来间接测速。也就是说,我们测的并非是关于此 target,各个镜像站的速度。而是,关于某几个大型 iso 文件,各个镜像站的速度。

    我们顶多只能实现:

    1. 测一个具体可下载的文件的速度,如:chsrc measure <https://example.com/abc.iso>
    2. 测多个镜像站的速度,如: chsrc measure <target> <mirror1> <mirror2>

    但是第2个,我觉得意义不大,因为 chsrc measure <target> 总共就只测顶多十来个源,每个源8秒钟左右,用户等最多80秒左右。

    你想要具体实现哪个功能?还是你有其他的想法?

  5. shiquda commented on Jun 12, 2025

    @shiquda

    @shiquda

    这个 issue 之所以拖延没有处理是因为,“用于测速的链接” 和 “换源的链接” 是不一样的。大多数用户只能找到换源链接,但是不会去找一个 “用于测速的链接”,到现在为止,很多 target 的测速链接都是空的,都是通过去测镜像站的其他文件来间接测速。也就是说,我们测的并非是关于此 target,各个镜像站的速度。而是,关于某几个大型 iso 文件,各个镜像站的速度。

    我们顶多只能实现:

    1. 测一个具体可下载的文件的速度,如:chsrc measure <https://example.com/abc.iso>
    2. 测多个镜像站的速度,如: chsrc measure <target> <mirror1> <mirror2>

    但是第2个,我觉得意义不大,因为 chsrc measure <target> 总共就只测顶多十来个源,每个源8秒钟左右,用户等最多80秒左右。

    你想要具体实现哪个功能?还是你有其他的想法?

    我的需求是这样的,由于目前内置的 docker 源较少,想要指定 docker 这个 target,然后提供自定义的若干源进行测速,即 chsrc measure <target> <mirror1> <mirror2> ,不限于软件目前提供的这些源。如果在指定 target 的情况下,软件实现可以实现对该 target 的指定源,找到一个合适的下载目标进行测速吗?

  6. ccmywish commented on Jun 12, 2025

    @ccmywish
    Contributor

    @shiquda 明白你的意思了。

    你可以帮我们找一个 “Docker Hub” 的下载目标吗?我们拿来测试实现这个功能。

  7. added this to the v0.2.2 milestone on Jun 12, 2025
  8. shiquda commented on Jun 12, 2025

    @shiquda

    @shiquda 明白你的意思了。

    你可以帮我们找一个 “Docker Hub” 的下载目标吗?我们拿来测试实现这个功能。

    好像有些麻烦,因为docker registry的下载必须经过一个临时的认证,对于镜像站来说,没找到一个公开的可用于测试的目标

  9. modified the milestones: v0.2.2, v0.2.3 on Jul 26, 2025
  10. modified the milestones: v0.2.3, v0.2.4 on Oct 6, 2025
  11. modified the milestones: v0.2.4, v0.2.5 on Dec 31, 2025
  12. modified the milestones: v0.2.5, v0.3.0 on Mar 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions