updates.php 461 B

12345678910111213141516171819202122
  1. <?php
  2. //
  3. // 5. Database updates
  4. //
  5. require_once dirname(__FILE__).'/once.php.inc';
  6. function main() {
  7. // Read number of queries to run from URL parameter
  8. $query_count = 1;
  9. if (!empty($_GET['queries'])) {
  10. $query_count = intval($_GET['queries']);
  11. }
  12. // Fix the queries limits
  13. $query_count = $query_count < 1 ? 1 : ($query_count > 500 ? 500 : $query_count);
  14. $b = new Benchmark();
  15. $b->bench_updates($query_count);
  16. }
  17. main();