Log distribution path assembly's CPU use (user and system time)
This commit is contained in:
parent
3dafd404fa
commit
9fee5efe57
2 changed files with 10 additions and 2 deletions
|
@ -36,6 +36,7 @@
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <sys/resource.h>
|
||||||
#include "distribute.h"
|
#include "distribute.h"
|
||||||
#include "path.h"
|
#include "path.h"
|
||||||
#include "update.h"
|
#include "update.h"
|
||||||
|
@ -72,6 +73,7 @@ finish_sects(int etu)
|
||||||
struct sctstr *sp;
|
struct sctstr *sp;
|
||||||
struct natstr *np;
|
struct natstr *np;
|
||||||
int n;
|
int n;
|
||||||
|
struct rusage rus1, rus2;
|
||||||
struct distinfo *infptr;
|
struct distinfo *infptr;
|
||||||
|
|
||||||
if (g_distptrs == NULL) {
|
if (g_distptrs == NULL) {
|
||||||
|
@ -102,6 +104,7 @@ finish_sects(int etu)
|
||||||
logerror("done delivering\n");
|
logerror("done delivering\n");
|
||||||
|
|
||||||
logerror("assembling paths...\n");
|
logerror("assembling paths...\n");
|
||||||
|
getrusage(RUSAGE_SELF, &rus1);
|
||||||
|
|
||||||
/* First, enable the best_path cacheing */
|
/* First, enable the best_path cacheing */
|
||||||
bp_enable_cachepath();
|
bp_enable_cachepath();
|
||||||
|
@ -115,7 +118,12 @@ finish_sects(int etu)
|
||||||
/* Now, clear the best_path cache that may have been created */
|
/* Now, clear the best_path cache that may have been created */
|
||||||
bp_clear_cachepath();
|
bp_clear_cachepath();
|
||||||
|
|
||||||
logerror("done assembling paths\n");
|
getrusage(RUSAGE_SELF, &rus2);
|
||||||
|
logerror("done assembling paths %g user %g system",
|
||||||
|
rus2.ru_utime.tv_sec + rus2.ru_utime.tv_usec / 1e6
|
||||||
|
- (rus1.ru_utime.tv_sec + rus1.ru_utime.tv_usec / 1e6),
|
||||||
|
rus2.ru_stime.tv_sec + rus2.ru_stime.tv_usec / 1e6
|
||||||
|
- (rus1.ru_stime.tv_sec + rus1.ru_stime.tv_usec / 1e6));
|
||||||
|
|
||||||
logerror("exporting...");
|
logerror("exporting...");
|
||||||
for (n = 0; NULL != (sp = getsectid(n)); n++) {
|
for (n = 0; NULL != (sp = getsectid(n)); n++) {
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
* Dave Pare, 1994
|
* Dave Pare, 1994
|
||||||
* Steve McClure, 1996
|
* Steve McClure, 1996
|
||||||
* Doug Hay, 1998
|
* Doug Hay, 1998
|
||||||
* Markus Armbruster, 2006-2009
|
* Markus Armbruster, 2006-2011
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue