Author: mcantelon
Date: Wed Jan 4 15:39:45 2012
New Revision: 10559
Log:
Added optional display of memory usage in import tool.
Modified:
trunk/lib/task/csvImportTask.class.php
Modified: trunk/lib/task/csvImportTask.class.php
==============================================================================
--- trunk/lib/task/csvImportTask.class.php Wed Jan 4 15:16:12 2012
(r10558)
+++ trunk/lib/task/csvImportTask.class.php Wed Jan 4 15:39:45 2012
(r10559)
@@ -337,6 +337,7 @@
{
// row count isn't incremented until completion of this closure, so
add one to reflect reality
$rowsProcessed = $self->getStatus('rows') + 1;
+ $memoryUsageMB = round(memory_get_usage() / (1024 * 1024), 2);
if ($options['rows-until-update'] && !($rowsProcessed %
$options['rows-until-update']))
{
$elapsed = $self->getTimeElapsed();
@@ -344,7 +345,7 @@
$averageTime = round($elapsed / $rowsProcessed, 2);
print "\n". $rowsProcessed ." rows processed in ". $elapsedMinutes
- . " minutes (". $averageTime ." second/row average).\n";
+ . " minutes (". $averageTime ." second/row average, ".
$memoryUsageMB ." MB used).\n";
}
}
}
@@ -433,6 +434,7 @@
}
});
+//print_r($GLOBALS['materialTypes']); exit();
$import->addColumnHandler('radGeneralMaterialDesignation',
function(&$self, $data)
{
if ($data)
@@ -441,7 +443,9 @@
'Text' => 'Textual record',
'Photograph' => 'Graphic material',
'ArchitecturalPlan' => 'Architectural drawing',
- 'Audio' => 'Sound recording'
+ 'Audio' => 'Sound recording',
+ 'MovingImage' => 'Moving images',
+ 'Map' => 'Cartographic material'
);
if (isset($cvaToQubit[$data]))
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.