Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #20160

Re: log and figure out what bits are slow and optimize them.

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <arnodel@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'think,': 0.05; 'bits': 0.07; 'decorator': 0.09; 'subject:log': 0.09; 'received:209.85.214.174': 0.13; 'cc:addr:python-list': 0.16; 'wrote:': 0.18; 'this?': 0.19; 'cc:no real name:2**0': 0.21; 'wrote': 0.21; 'header:In-Reply-To:1': 0.22; 'modify': 0.25; 'cc:2**0': 0.26; 'code': 0.26; 'figure': 0.26; 'function': 0.27; 'message-id:@mail.gmail.com': 0.29; 'cc:addr:python.org': 0.29; 'url:library': 0.31; 'familiar': 0.32; 'requests': 0.32; 'it.': 0.33; 'hi,': 0.34; 'url:python': 0.35; 'received:209.85.214': 0.36; 'received:google.com': 0.37; 'using': 0.37; 'received:209.85': 0.38; 'url:org': 0.39; 'suggestions': 0.39; 'received:209': 0.39; 'your': 0.61
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=cZsZrp2G0DKqjeuOKZ875JHlbrmsr1Llfkmr5K0eLhY=; b=AL15ObEHeGKCtkXNUarhdlDPO0ifWlNf03CoC21uq7nZy4JrDlrM82lU6qbwt7B08W 7jpJK5aTVG6Q0ihPKry2Zpqrl6qMG9/7QvAtycf1Z5BlbImmA2oXoZmMeNkNwwUsGauw aIfAv8oiHMvny2PEig9NniW9JPXhcM9mnoec4=
MIME-Version 1.0
In-Reply-To <a07666f2-a18b-4bf5-bbdc-8d7f74db09be@q8g2000pbb.googlegroups.com>
References <a07666f2-a18b-4bf5-bbdc-8d7f74db09be@q8g2000pbb.googlegroups.com>
Date Fri, 10 Feb 2012 12:38:34 +0000
Subject Re: log and figure out what bits are slow and optimize them.
From Arnaud Delobelle <arnodel@gmail.com>
To sajuptpm <sajuptpm@gmail.com>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.5654.1328877518.27778.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1328877518 news.xs4all.nl 6913 [2001:888:2000:d::a6]:50127
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:20160

Show key headers only | View raw


On 10 February 2012 12:30, sajuptpm <sajuptpm@gmail.com> wrote:
> Hi,
>
> I want to log time taken to complete database requests inside a method/
> function using decorator .  is it possible ????
> I think, i have to inject log code inside the method/fuctions or
> modify it.
> I wrote a decorator to log taken by a method/function to complete it
> execution and its working well.
>
> My requirement : log everything and figure out what bits are slow and
> optimize them.
>
> What are your suggestions ??

Are you familiar with this?

http://docs.python.org/library/profile.html

-- 
Arnaud

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 04:30 -0800
  Re: log and figure out what bits are slow and optimize them. Arnaud Delobelle <arnodel@gmail.com> - 2012-02-10 12:38 +0000
    Re: log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 04:56 -0800
      Re: log and figure out what bits are slow and optimize them. Kev Dwyer <kevin.p.dwyer@gmail.com> - 2012-02-10 22:37 +0000
        Re: log and figure out what bits are slow and optimize them. John Gordon <gordon@panix.com> - 2012-02-10 23:06 +0000
          Re: log and figure out what bits are slow and optimize them. sajuptpm <sajuptpm@gmail.com> - 2012-02-10 23:53 -0800
  Re: log and figure out what bits are slow and optimize them. Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-02-10 14:25 +0000

csiph-web