Roxen.git / server / base_server / roxen.pike

version» Context lines:

Roxen.git/server/base_server/roxen.pike:1:   // This file is part of Roxen WebServer.   // Copyright © 1996 - 2004, Roxen IS.   //   // The Roxen WebServer main program.   //   // 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.992 2008/09/29 16:10:56 mast Exp $"; + constant cvs_version="$Id: roxen.pike,v 1.993 2008/09/30 12:18:17 mast Exp $";      //! @appears roxen   //!   //! The Roxen WebServer main program.      // The argument cache. Used by the image cache.   ArgCache argcache;      // Some headerfiles   #define IN_ROXEN
Roxen.git/server/base_server/roxen.pike:1176: Inside #if defined(THREADS) and #if defined(DEBUG_BACKGROUND_RUN)
   {return sprintf ("%O", arg);}) * ", ",    bg_queue->size());   #endif       float task_vtime, task_rtime;      #ifndef NO_SLOW_REQ_BT    if ((monitor = slow_req_monitor) && slow_req_timeout > 0.0) {    call_out = monitor->call_out (dump_slow_req, slow_req_timeout,    this_thread(), slow_req_timeout); - #endif +     int start_hrtime = gethrtime (1);    task_vtime = gauge {    if (task[0]) // Ignore things that have become destructed.    // Note: BackgroundProcess.repeat assumes that there are    // exactly two refs to task[0] during the call below.    task[0] (@task[1]);    };    task_rtime = (gethrtime (1) - start_hrtime) / 1e9; - #ifndef NO_SLOW_REQ_BT +     monitor->remove_call_out (call_out);    } -  +  else   #endif -  +  { +  int start_hrtime = gethrtime (1); +  task_vtime = gauge { +  if (task[0]) +  task[0] (@task[1]); +  }; +  task_rtime = (gethrtime (1) - start_hrtime) / 1e9; +  }       if (task_rtime > 60.0)    report_warning ("Warning: Background job took more than one minute "    "(%g s real time and %g s cpu time):\n"    " %s (%s)\n%s",    task_rtime, task_vtime,    functionp (task[0]) ?    sprintf ("%s: %s", Function.defined (task[0]),    master()->describe_function (task[0])) :    programp (task[0]) ?
Roxen.git/server/base_server/roxen.pike:5423:    {    array(string) splitdir = roxen_path ("$LOGFILE") / "/";    cdt_filename = splitdir[-1];    cdt_directory = splitdir[..sizeof (splitdir) - 2] * "/";    if (has_suffix (cdt_filename, ".1"))    cdt_filename = cdt_filename[..sizeof (cdt_filename) - 3];    cdt_filename += ".dump_threads";    cdt_changed (getvar ("dump_threads_by_file"));    }    + #ifndef NO_SLOW_REQ_BT    slow_req_count_changed();    slow_req_timeout_changed();    slow_be_timeout_changed(); -  + #endif      #ifdef ROXEN_DEBUG_MEMORY_TRACE    restart_roxen_debug_memory_trace();   #endif      #ifndef __NT__    restart_if_stuck( 0 );   #endif   #ifdef __RUN_TRACE    trace(1);