Profiling Results

Introduction

We have a test dataset of ~1500 small objects (each with 5 to 15 integer, datetime or short string properties). They represent a dozen different classes which refer each other in a hierarchical structure. See attachments for some samples of profiling data for that dataset. Added by akaihola who works at ambitone.com

How to generate profiling data for KCacheGrind

To generate callgrind.out files from cProfile you need lsprofcalltree.py. Here is a small example:

from pyamf.amf3 import encode
from cProfile import Profile
from lsprofcalltree import KCacheGrind

d = get_some_sufficiently_large_data_structure()
prof = Profile().runctx('encode(d)', globals(), locals())

KCacheGrind(prof).output(file('/tmp/callgrind.out', 'w'))

Attachments