leepro / yappi

Automatically exported from code.google.com/p/yappi
MIT License
0 stars 0 forks source link

get_stats() return profiling data as dict() #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. yappi.start()
2. output = yappi.get_stats()
3. type(output)

What is the expected output? What do you see instead?
expected output: type(output) == type(dict)

Please provide any additional information below.
if output was of type dict, it would be much easier to iterate through data and 
we could among much else much easier commit profiling data to a sqlite3 
database for later use

Original issue reported on code.google.com by izarf.m...@gmail.com on 4 May 2012 at 4:58

GoogleCodeExporter commented 9 years ago

Original comment by sum...@gmail.com on 7 May 2012 at 6:15

GoogleCodeExporter commented 9 years ago
In the current code, we used a structure like NamedTuple in code which is 
better than a dict IMHO. Example:

stats = get_func_stats()
print(stat.name)

Original comment by sum...@gmail.com on 13 Dec 2012 at 10:03

GoogleCodeExporter commented 9 years ago

Original comment by sum...@gmail.com on 13 Dec 2012 at 10:04