英文:
what is output of -mzeep --profile?
问题
我正在使用Python和Zeep编写一个SOAP客户端,并且正在使用-mzeep工具进行实验。它有一个选项--profile [filename]。有人知道输出文件的格式或者它的作用吗?文档只是这样说:*--profile PROFILE 启用分析并将输出保存到给定的文件中。*我找不到更多的信息。该文件似乎是二进制文件。
英文:
I am writing a saop client in python and zeep and I am playing with the -mzeep tool. It has an option --profile [filename]. Does anybody know the output file's format or what it is for? The documentation says only this: --profile PROFILE Enable profiling and save output to given file.
I was not able to find any more info. The file seems to be a binary.
答案1
得分: 1
根据源代码,它似乎是这样做的:
if args.profile:
import cProfile
profile = cProfile.Profile()
profile.enable()
cProfile是Python分析器之一,因此输出文件必须特定于cProfile。Stats类可以读取它并允许您打印其中的各种详细信息。
英文:
Based on the source code, it seems to be doing this:
if args.profile:
import cProfile
profile = cProfile.Profile()
profile.enable()
cProfile is one of the Python profilers, so the output file must be specific to cProfile. The Stats class can read it and allow you to print various details from it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论