Update of /cvsroot/perfparse/_perfparse/db_tools
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17070/db_tools
Modified Files:
convert.c
Log Message:
debug code
Index: convert.c
===================================================================
RCS file: /cvsroot/perfparse/_perfparse/db_tools/convert.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** convert.c 10 Apr 2007 15:03:27 -0000 1.27
--- convert.c 10 Apr 2007 23:24:00 -0000 1.28
***************
*** 47,50 ****
--- 47,53 ----
#define SERVICE "service"
+ // debug
+ #define DEBUG
+
void addIdFields ();
void checkTables ();
***************
*** 89,92 ****
--- 92,98 ----
if((pPid=g_hash_table_lookup(policiesCache,policy_name))) {
Pid=*pPid;
+ #ifdef DEBUG
+ printw("\nPolicyId Cache Hit: %s -> %d\n",policy_name,Pid);refresh();
+ #endif
return(Pid);
} else {
***************
*** 107,111 ****
// save result in cache
g_hash_table_insert(policiesCache,(gpointer) policy_name,&Pid);
!
return(Pid);
}
--- 113,119 ----
// save result in cache
g_hash_table_insert(policiesCache,(gpointer) policy_name,&Pid);
! #ifdef DEBUG
! printw("\nPolicyId Cache Miss: %s -> %d\n",policy_name,Pid);refresh();
! #endif
return(Pid);
}
***************
*** 118,121 ****
--- 126,132 ----
if((pGid=g_hash_table_lookup(groupsCache,group_name))) {
Gid=*pGid;
+ #ifdef DEBUG
+ printw("\nGroupId Cache Hit: %s -> %d\n",group_name,Gid);refresh();
+ #endif
return(Gid);
} else {
***************
*** 136,140 ****
// save result in cache
g_hash_table_insert(groupsCache,(gpointer) group_name,&Gid);
!
return(Gid);
}
--- 147,153 ----
// save result in cache
g_hash_table_insert(groupsCache,(gpointer) group_name,&Gid);
! #ifdef DEBUG
! printw("\nGroupId Cache Miss: %s -> %d\n",group_name,Gid);refresh();
! #endif
return(Gid);
}
***************
*** 147,150 ****
--- 160,166 ----
if((pHid=g_hash_table_lookup(hostsCache,host_name))) {
Hid=*pHid;
+ #ifdef DEBUG
+ printw("\nHostId Cache Hit: %s -> %d\n",host_name,Hid);refresh();
+ #endif
return(Hid);
} else {
***************
*** 165,169 ****
// save result in cache
g_hash_table_insert(hostsCache,(gpointer) host_name,&Hid);
!
return(Hid);
}
--- 181,187 ----
// save result in cache
g_hash_table_insert(hostsCache,(gpointer) host_name,&Hid);
! #ifdef DEBUG
! printw("\nHostId Cache Miss: %s -> %d\n",host_name,Hid);refresh();
! #endif
return(Hid);
}
***************
*** 762,765 ****
--- 780,785 ----
void exit_curses(int exitval) {
+ printw(_("Exiting in 10 Sec.")); refresh();
+ sleep(10);
end_curses();
exit(exitval);
|