“-mzeep –profile” 的输出是什么?

huangapple go评论86阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年8月9日 18:00:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76866623.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定