From 173470f6f12ec5a4b67e07bd8d700e4777127b25 Mon Sep 17 00:00:00 2001 From: sam marshall Date: Mon, 9 Sep 2013 15:00:13 +0100 Subject: [PATCH] BACKUP TESTING: Display task/step progress and percentages, with times --- backup/util/plan/base_plan.class.php | 1 + backup/util/plan/base_task.class.php | 1 + backup/util/progress/core_backup_display_progress.class.php | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backup/util/plan/base_plan.class.php b/backup/util/plan/base_plan.class.php index c465b2e..b771202 100644 --- a/backup/util/plan/base_plan.class.php +++ b/backup/util/plan/base_plan.class.php @@ -173,6 +173,7 @@ abstract class base_plan implements checksumable, executable { // Build and execute all tasks. foreach ($this->tasks as $task) { + print_object(date('H:i:s') . ': ' . get_class($task) . ' ' . $task->get_name()); flush(); $task->build(); $task->execute(); } diff --git a/backup/util/plan/base_task.class.php b/backup/util/plan/base_task.class.php index e167b89..40a64ad 100644 --- a/backup/util/plan/base_task.class.php +++ b/backup/util/plan/base_task.class.php @@ -178,6 +178,7 @@ abstract class base_task implements checksumable, executable, loggable { // Execute all steps. foreach ($this->steps as $step) { + print_object(date('H:i:s') . ': ' . get_class($step) . ' ' . $step->get_name()); flush(); $result = $step->execute(); // If step returns array, it will be forwarded to plan // (TODO: shouldn't be array but proper result object) diff --git a/backup/util/progress/core_backup_display_progress.class.php b/backup/util/progress/core_backup_display_progress.class.php index f893b43..99fbe1a 100644 --- a/backup/util/progress/core_backup_display_progress.class.php +++ b/backup/util/progress/core_backup_display_progress.class.php @@ -133,7 +133,7 @@ class core_backup_display_progress extends core_backup_progress { $message = $this->get_current_description(); } $this->bar->update_full($min * 100, $message); - +print_object(date('H:i:s') . ' [Progress ' . round($min * 100, 4) . '%]'); // Flush output. flush(); } -- 1.7.10.msysgit.1