[Zope-dev] Zope Server hanging :-(

Chris McDonough chrism@digicool.com
Thu, 3 May 2001 11:23:01 -0400


Please apply this patch, sorry!

*** requestprofiler.py 2001/04/26 02:51:49 1.3
--- requestprofiler.py 2001/05/03 15:12:13
***************
*** 269,276 ****
                  i2 = i + 1
                  v1 = all[i]
                  v2 = all[i2]
!                 if v1 == "NA" or v2 == "NA": return "I"
!                 else: return (all[i] + all[i2]) / 2

      def total(self):
          t = 0
--- 269,276 ----
                  i2 = i + 1
                  v1 = all[i]
                  v2 = all[i2]
!                 if type(v1) is type('') or type(v2) is type(''): return
"I"
!                 else: return (v1 + v2) / 2

      def total(self):
          t = 0

----- Original Message -----
From: "Chris Withers" <chrisw@nipltd.com>
To: "Chris McDonough" <chrism@digicool.com>
Cc: "Tim McLaughlin" <tim@BCSWebservices.net>; <zope-dev@zope.org>
Sent: Thursday, May 03, 2001 10:35 AM
Subject: Re: [Zope-dev] Zope Server hanging :-(


> Chris McDonough wrote:
> >
> > You can also use cumulative reporting to sort by "hangs":
> >
> >   requestprofiler.py your.log.file --cumulative --sort=hangs
>
> python requestprofiler.py my.log --cumulative --sort=hangs > out2.txt
>
> resulted in:
>
> Traceback (innermost last):
>   File "requestprofiler.py", line 586, in ?
>     analyze(open(sys.argv[1]), top, sortf, start, end, mode)
>   File "requestprofiler.py", line 346, in analyze
>     write(dict, top)
>   File "requestprofiler.py", line 360, in write
>     print str(stat)[:78]
>   File "requestprofiler.py", line 226, in __str__
>     body = (
>   File "requestprofiler.py", line 273, in median
>     else: return (all[i] + all[i2]) / 2
> TypeError: number coercion failed
>
> Any ideas?
>
> cheers,
>
> Chris
>