You are here

function perfmon_test_db_prepare in Performance monitor 8

Same name and namespace in other branches
  1. 7 perfmon.inc \perfmon_test_db_prepare()

Prepare to test mysql.

3 calls to perfmon_test_db_prepare()
perfmon_test_db_read in ./perfmon.module
Test db read operations.
perfmon_test_db_update in ./perfmon.module
Test db update operations.
perfmon_test_db_write in ./perfmon.module
Test db write operations.

File

./perfmon.module, line 226
Stand-alone perfmon test system.

Code

function perfmon_test_db_prepare($testname, $count) {
  for ($i = 0; $i < $count; $i++) {
    \Drupal::database()
      ->insert('perfmon_test')
      ->fields([
      'id' => $i,
      'testname' => 'dbtest',
      'data' => 'aaaaaaaaaaaaaaaaaaaaa',
    ])
      ->execute();
  }
}