You are here

function migrate_instrument_start in Migrate 7.2

Same name and namespace in other branches
  1. 6.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).

58 calls to migrate_instrument_start()
MigrateDestinationComment::bulkRollback in plugins/destinations/comment.inc
Delete a batch of comments at once.
MigrateDestinationComment::import in plugins/destinations/comment.inc
Import a single comment.
MigrateDestinationCustomBlock::bulkRollback in plugins/destinations/block_custom.inc
Delete a batch of custom blocks at once.
MigrateDestinationCustomBlock::import in plugins/destinations/block_custom.inc
Import a single row.
MigrateDestinationFile::rollback in plugins/destinations/file.inc
Delete a file entry.

... See full list

File

./migrate.module, line 564
API and drush commands to support migration of data from external sources into a Drupal installation.

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);
  }
}