#!/usr/bin/php get_last_error()); print_line('---------------------------------------------------------'); die(); break; } else { list($imported, $last_comment_id) = $result; } $total += $imported; $time = abs(microtime() - $start); // assuming the cache is the internal, reset it's value to empty to avoid // large memory consump $wp_object_cache->cache = array(); $new_memory_usage = memory_get_peak_usage(); print_line(' %d comments imported (took %.2fs, memory increased by %db)', $imported, $time, ($new_memory_usage - $memory_usage)); $memory_usage = $new_memory_usage; } $total_time = abs(microtime() - $global_start); print_line('---------------------------------------------------------'); print_line('Done (took %.2fs)! %d comments imported from DISQUS', $total_time, $total); print_line('---------------------------------------------------------'); ?>