No Cython-level profiling information

13 views
Skip to first unread message

Nikolaus Rath

unread,
Oct 23, 2011, 5:02:44 PM10/23/11
to cython...@googlegroups.com
Hello,

I'm trying to profile my Cython extension. I'm using Cython 0.15.1 and
followed the instructions on
http://docs.cython.org/src/tutorial/profiling_tutorial.html:

I have added

# cython: profile=True

to the top of my .pyx file and compiled it with 'cython -v -Wextra' and

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c src/s3ql/deltadump.c -o build/temp.linux-x86_64-2.7/src/s3ql/deltadump.o -Wall -Wextra -Wconversion -Wno-sign-conversion -Werror=conversion -Wno-unused-parameter -Wno-unused-but-set-variable -fno-strict-aliasing
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-x86_64-2.7/src/s3ql/deltadump.o -o build/lib.linux-x86_64-2.7/s3ql/deltadump.so -lsqlite3

Then I wrapped a function that calls my extension module into
cProfile.runctx().

However, when looking at the profiling information, there is nothing
from the Cython level, only the one call into the module:
(s3ql.deltadump.dump_delta):


ncalls tottime percall cumtime percall filename:lineno(function)
[...]
1 3.286 3.286 3.476 3.476 {s3ql.deltadump.dump_delta}
[...]

What am I doing wrong?


Thanks,

-Nikolaus

--
»Time flies like an arrow, fruit flies like a Banana.«

PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6 02CF A9AD B7F8 AE4E 425C

Reply all
Reply to author
Forward
0 new messages