1998-08-20
1998-08-20 07:41:47 by Per Hedbor <ph@opera.com>
-
3117792a913ec38d16cf15e8295f704966ea5735
(16 lines)
(+12/-4)
[
Show
| Annotate
]
Branch: 5.2
Added support for directory level profiling
Rev: server/protocols/http.pike:1.112
6: Inside #if defined(MAGIC_ERROR)
#ifdef MAGIC_ERROR
inherit "highlight_pike";
#endif
- constant cvs_version = "$Id: http.pike,v 1.111 1998/08/10 21:46:09 per Exp $";
+ constant cvs_version = "$Id: http.pike,v 1.112 1998/08/20 07:41:47 per Exp $";
// HTTP protocol module.
#include <config.h>
private inherit "roxenlib";
595: Inside #if defined(PROFILE)
if(conf)
{
float elapsed = SECHR(HRTIME()-req_time);
+ string nid =
+ #ifdef FILE_PROFILE
+ not_query
+ #else
+ dirname(not_query)
+ #endif
+ ;
array p;
- if(!(p=conf->profile_map[not_query]))
- p = conf->profile_map[not_query] = ({0,0.0,0.0});
- conf->profile_map[not_query][0]++;
+ if(!(p=conf->profile_map[nid]))
+ p = conf->profile_map[nid] = ({0,0.0,0.0});
+ conf->profile_map[nid][0]++;
p[1] += elapsed;
if(elapsed > p[2]) p[2]=elapsed;
}