如何在python和js中构建带有百分比的进度条
我有一个 js、css 和 html 的 GUI,以及一个 python 的服务器。服务器正在自动运行测试,我想向用户显示已经完成了多少测试。每个测试位于发送到服务器的配置文件中(如果有多个配置文件,则一次全部发送,每个配置文件可以包含多个测试) 我考虑过在开始测试之前对所有conf文件中的每个conf文件(它是一个json,所以可以只获取测试列表len)中的所有测试进行求和,以了解我总共有多少个测试,然后每次完成测试时我使用一个线程向 GUI 发送已完成的测试数量的更新。 还有其他更高效、运行时间成本更低的方法吗?
i have a GUI in js css and html, and a server in python. the server is running tests automatically and i want to show the user how many tests has been done. each test is located in a a configuration file that is sent to the server (in case of multiple configuration files, all sent at once, and each configuration file can contain multiple tests)
i thought about summing all the tests in each conf file (its a json so can just take the test list len) on all conf files before i start the testing to know how many tests i have in total and then every time i finish a test i use a thread to send the GUI an update of how many tests has been done.
is there any other way which is more efficient and cost less runtime?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论