Closed euri10 closed 4 years ago
Yes, I might agree it might be better for some situations, but how about:
you do the formatting yourself:
for stat in yappi.get_func_stats():
print("%.5s.%s:%d %d" % (stat.module, stat.name, stat.lineno, stat.ncall))
Not so hard, IMHO?
Ha yes excellent ! Way better indeed, sorry I didnt realize you could access stat like that , it's very clean
Le lun. 2 déc. 2019 à 3:31 PM, Sümer Cip notifications@github.com a écrit :
Yes, I might agree it might be better for some situations, but how about:
you do the formatting yourself:
for stat in yappi.get_func_stats(): print("%.5s.%s:%d %d" % (stat.module, stat.name, stat.lineno, stat.ncall))
Not so hard, IMHO?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/sumerc/yappi/issues/25?email_source=notifications&email_token=AAINSPSNW77ALRHG5LCTZI3QWUL37A5CNFSM4JTV6Y3KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFTVOCQ#issuecomment-560420618, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAINSPS4VO6Q3MPRDJ7MWWTQWUL37ANCNFSM4JTV6Y3A .
This is a rather cosmetic issue, yet I'm running a
logger.debug(yappi.get_func_stats({"tag": ctx_id}).print_all())
and find it difficult to read the output for the names (see below), is it possible to get a "nicer" outputI thought using a
fmt
kwarg and passingsomething like in https://docs.python.org/3/library/logging.html#logrecord-attributes would be awesome, at least it would feel naturalI currently have to use
debug_print()
to get a sense of those names but it would be awesome to be able to do aprint_all(fmt=''%(filename)s %(funcName)s %(lineno)d")
for instance