Branch: Tag:

2001-02-27

2001-02-27 02:54:34 by Per Hedbor <ph@opera.com>

Added minimum bandwidth support, and added TIMER_*() macros for performance optimization reasons.

Rev: server/base_server/configuration.pike:1.418
Rev: server/base_server/global_variables.pike:1.63
Rev: server/base_server/roxen.pike:1.637
Rev: server/protocols/http.pike:1.306
Rev: server/protocols/prot_http.pike:2.2

4:   // Per Hedbor, Henrik Grubbström, Pontus Hagland, David Hedbor and others.      // ABS and suicide systems contributed freely by Francesco Chemolli - constant cvs_version="$Id: roxen.pike,v 1.636 2001/02/23 07:13:37 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.637 2001/02/27 02:54:28 per Exp $";      // Used when running threaded to find out which thread is the backend thread.   Thread.Thread backend_thread;
19:   #include <module.h>   #include <variables.h>   #include <stat.h> + #include <timers.h>      // Inherits   inherit "global_variables";
3432:    report_debug("Done [%.2fms]\n", (gethrtime()-t)/1000.0);   }    + #ifdef TIMERS + void show_timers() + { +  call_out( show_timers, 30 ); +  array a = values(timers); +  array b = indices( timers ); +  sort( a, b ); +  reverse(a); +  reverse(b); +  werror("Timers:\n"); +  for( int i = 0; i<sizeof(b); i++ ) +  werror( " %-30s : %10.1fms\n", b[i], a[i]/1000.0 ); +  werror("\n\n"); + } + #endif +    array argv;   int main(int argc, array tmp)   {
3444:    dump( "base_server/throttler.pike" );       add_constant( "Protocol", Protocol ); + #ifdef TIMERS +  call_out( show_timers, 30 ); + #endif +    #if constant(SSL.sslfile)    add_constant( "SSLProtocol", SSLProtocol );   #endif