You are here

function migrate_instrument_start in Migrate 6.2

Same name and namespace in other branches
  1. 7.2 migrate.module \migrate_instrument_start()

Start measuring time and (optionally) memory consumption over a section of code. Note that the memory consumption measurement is generally not useful in lower areas of the code, where data is being generated that will be freed by the next call to the same area. For example, measuring the memory consumption of db_query is not going to be helpful.

Parameters

$name: The name of the measurement.

$include_memory: Measure both memory and timers. Defaults to FALSE (timers only).

38 calls to migrate_instrument_start()
drush_migrate_wipe in ./migrate.drush.inc
A drush command callback.
MigrateDestinationComment::import in plugins/destinations/comment.inc
Import a single comment.
MigrateDestinationNode::import in plugins/destinations/node.inc
Import a single node.
MigrateDestinationNode::rollback in plugins/destinations/node.inc
Delete a node
MigrateDestinationTable::rollback in plugins/destinations/table.inc
Delete a single row.

... See full list

File

./migrate.module, line 578

Code

function migrate_instrument_start($name, $include_memory = FALSE) {
  global $_migrate_track_memory, $_migrate_track_timer;
  if ($_migrate_track_memory && $include_memory) {
    migrate_memory_start($name);
  }
  if ($_migrate_track_timer) {
    timer_start($name);
  }
}