)]}'
{
  "commit": "8b70d0b04f6bba2f30827d71084dd74fd00808b3",
  "tree": "245969be7b29246bcb5ca39fc6661f0aeea7dd75",
  "parents": [
    "3df537822f594ffefe4d5e121c0b2430c9c12806"
  ],
  "author": {
    "name": "ajs",
    "email": "ajs",
    "time": "Thu Apr 28 01:31:13 2005 +0000"
  },
  "committer": {
    "name": "ajs",
    "email": "ajs",
    "time": "Thu Apr 28 01:31:13 2005 +0000"
  },
  "message": "2005-04-27 Andrew J. Schorr \u003cajschorr@alumni.princeton.edu\u003e\n\n\tAdd wall-clock timing statistics to \u0027show thread cpu\u0027 output.\n\t* thread.h: Define struct rusage_t to contain wall-clock time\n\t  and cpu time.  Change GETRUSAGE macro to collect both pieces\n\t  of data.  Make appropriate changes to struct cpu_thread_history\n\t  to track CPU time and real time.  Change proto for\n\t  thread_consumed_time to return real and cpu time elapsed.\n\t  And declare a new global variable \u0027struct timeval recent_time\u0027.\n\t* thread.c (struct timeval recent_time): New global timestamp variable.\n\t  (timeval_adjust): If timeout is negative, set to 0 (not 10\n\t  microseconds).  And remove upper bound of 1,000,000 seconds, since\n\t  this does not seem to make any sense (and it breaks\n\t  funcname_thread_add_timer_timeval).\n\t  (timeval_cmp): Should return long, not int.\n\t  (vty_out_cpu_thread_history): Show CPU time and real time.\n\t  (cpu_record_hash_print): Calculate totals for CPU and real time.\n\t  (cpu_record_print): Change \u0027show thread cpu\u0027 title to show CPU and\n\t  real time.\n\t  (thread_timer_remain_second): Put current time in global recent_time.\n\t  (funcname_thread_add_timer_timeval): Fix assert.  Replace 2-case\n\t  switch assignment with a ternary expression.  Use global recent_time\n\t  variable.  Fix use of timeval_adjust (previously, the value was not\n\t  actually being adjusted).\n\t  (thread_cancel): Add missing \"break\" statement in case\n\t  THREAD_BACKGROUND.\n\t  (thread_timer_wait): Use global recent_time value instead of calling\n\t  gettimeofday.  And there\u0027s no need to check for negative timeouts,\n\t  since timeval_subtract already sets these to zero.\n\t  (thread_timer_process): Timers are sorted, so bail out once we\n\t  encounter a timer that has not yet popped.  And remove some\n\t  extraneous asserts.\n\t  (thread_fetch): Do not process foreground timers before calling\n\t  select.  Instead, add them to the ready list just after the select.\n\t  Also, no need to maintain a count of the number of ready threads,\n\t  since we don\u0027t care how many there are, just whether there\u0027s\n\t  one at the head of the ready list (which is easily checked).\n\t  Stick current time in global variable recent_time to reduce\n\t  the number of calls to gettimeofday.  Tighten logic for\n\t  calculating the select timeout.\n\t  (thread_consumed_time): Now returns real time and puts the elapsed\n\t  cpu time in an additional argument.\n\t  (thread_should_yield): Use real (wall-clock) time to decide whether\n\t  to yield.\n\t  (thread_call): Maintain CPU and real time statistics.\n\t* vty.c (vty_command): For slow commands, show real and cpu time.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "65abfd03442a5e2a7b5dcc325add7a8f54b23274",
      "old_mode": 33188,
      "old_path": "lib/ChangeLog",
      "new_id": "8da9870e194b5a2fc3bc67c499849e7309cb86e6",
      "new_mode": 33188,
      "new_path": "lib/ChangeLog"
    },
    {
      "type": "modify",
      "old_id": "96ec50d0ce09b3214b374b21dec7f473ad929169",
      "old_mode": 33188,
      "old_path": "lib/thread.c",
      "new_id": "2e1dd2452e1e20b1266bc374e75f991887991385",
      "new_mode": 33188,
      "new_path": "lib/thread.c"
    },
    {
      "type": "modify",
      "old_id": "aef9df7904c978272c57363f4738c0687f4895f5",
      "old_mode": 33188,
      "old_path": "lib/thread.h",
      "new_id": "0d84cfc52d65ce2d0cd4f1f105858c8745e3ed2b",
      "new_mode": 33188,
      "new_path": "lib/thread.h"
    },
    {
      "type": "modify",
      "old_id": "ea74172c53ba5b7e3dffeb84f2801584c8117a32",
      "old_mode": 33188,
      "old_path": "lib/vty.c",
      "new_id": "e429ef17ce96ce593a15975ff3bd8cba6ba85cad",
      "new_mode": 33188,
      "new_path": "lib/vty.c"
    }
  ]
}
