Added agent screen latency logging, viewable in the Real-Time Report and
the new Agent Latency Report. git-svn-id: svn://192.168.202.10@3712 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -66,6 +66,7 @@
|
||||
# 220309-2246 - Added --api-archive-days=X and --api-archive-only flags
|
||||
# 220312-0859 - Added vicidial_dial_cid_log table archiving, same as vicidial_dial_log
|
||||
# 230418-1341 - Added vicidial_user_dial_log archiving, same as vicidial_dial_log
|
||||
# 230421-0057 - Added vicidial_agent_latency_summary_log archiving
|
||||
#
|
||||
|
||||
$CALC_TEST=0;
|
||||
@@ -3200,6 +3201,58 @@ if (!$T)
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_agent_latency_summary_log
|
||||
$stmtA = "SELECT count(*) from vicidial_agent_latency_summary_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_agent_latency_summary_log_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
$stmtA = "SELECT count(*) from vicidial_agent_latency_summary_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows=$sthA->rows;
|
||||
if ($sthArows > 0)
|
||||
{
|
||||
@aryA = $sthA->fetchrow_array;
|
||||
$vicidial_agent_latency_summary_log_archive_count = $aryA[0];
|
||||
}
|
||||
$sthA->finish();
|
||||
|
||||
if (!$Q) {print "\nProcessing vicidial_agent_latency_summary_log table... ($vicidial_agent_latency_summary_log_count|$vicidial_agent_latency_summary_log_archive_count)\n";}
|
||||
$stmtA = "INSERT IGNORE INTO vicidial_agent_latency_summary_log_archive SELECT * from vicidial_agent_latency_summary_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows inserted into vicidial_agent_latency_summary_log_archive table \n";}
|
||||
|
||||
$rv = $sthA->err();
|
||||
if (!$rv)
|
||||
{
|
||||
if ($wipe_all > 0)
|
||||
{$stmtA = "DELETE FROM vicidial_agent_latency_summary_log;";}
|
||||
else
|
||||
{$stmtA = "DELETE FROM vicidial_agent_latency_summary_log WHERE db_time < '$del_time';";}
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
$sthArows = $sthA->rows;
|
||||
if (!$Q) {print "$sthArows rows deleted from vicidial_agent_latency_summary_log table \n";}
|
||||
|
||||
$stmtA = "optimize table vicidial_agent_latency_summary_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
|
||||
$stmtA = "optimize table vicidial_agent_latency_summary_log_archive;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
$sthA->execute or die "executing: $stmtA ", $dbhA->errstr;
|
||||
}
|
||||
|
||||
|
||||
##### vicidial_carrier_log
|
||||
$stmtA = "SELECT count(*) from vicidial_carrier_log;";
|
||||
$sthA = $dbhA->prepare($stmtA) or die "preparing: ",$dbhA->errstr;
|
||||
|
||||
Reference in New Issue
Block a user