stronk7

Untitled

May 4th, 2021
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. <?php // Moodle configuration file
  2.  
  3. unset($CFG);
  4. global $CFG;
  5. $CFG = new stdClass();
  6.  
  7. $CFG->dbtype = 'pgsql';
  8. $CFG->dblibrary = 'native';
  9. $CFG->dbhost = 'localhost';
  10. $CFG->dbname = 'moodleperformancecomparison';
  11. $CFG->dbuser = 'stronk7';
  12. $CFG->dbpass = 'tonto_el_que_lo_lea'; // ;-)
  13. $CFG->prefix = 'mdl_';
  14. $CFG->dboptions = array (
  15. 'dbpersist' => 0,
  16. 'dbsocket' => 0,
  17. 'fetchbuffersize' => 0, // We don't use big data and cursors lead to an excess of dbreads (AUX). Hence, disabling them.
  18. );
  19.  
  20. $CFG->wwwroot = 'http://10.10.10.13/~stronk7/perf/moodle';
  21. $CFG->dataroot = '/Users/stronk7/Sites/perf_moodledata';
  22. $CFG->admin = 'admin';
  23.  
  24. // No debug! it changes db reads and db writes values.
  25. $CFG->debug = false;
  26. $CFG->debugdisplay = false;
  27.  
  28. // No cache_text to have results as stable as possible.
  29. $CFG->cachetext = 0;
  30.  
  31. // Time between threads accesses are randomly generated so we can
  32. // not have stable results with the core LASTACCESS_UPDATE_SECS value.
  33. // Moodle will try to define it again, the php error will be hidden with
  34. // debug mode disabled. https://tracker.moodle.org/browse/MDL-41910
  35. define('LASTACCESS_UPDATE_SECS', 9999999999);
  36.  
  37. // Some more settings towards results stability.
  38. define('NO_SESSION_UPDATE', true);
  39. $CFG->sessiontimeout = 172800;
  40. $CFG->session_update_timemodified_frequency = 9999999999;
  41. $CFG->messaging = 0; // Disable messaging, it's not used with current JMX plan.
  42.  
  43. // Set the generated users password to avoid the default non-loggeable one.
  44. $CFG->tool_generator_users_password = 'moodlerules';
  45.  
  46. // Using file sessions.
  47. $CFG->dbsessions = false;
  48.  
  49. if (!defined('CLI_SCRIPT')) {
  50. define('MDL_PERF_TEST', true);
  51. define('MDL_PERF', true);
  52. define('MDL_PERFDB', true);
  53. #define('MDL_PERFTOLOG', true);
  54. define('MDL_PERFTOFOOT', true);
  55. }
  56.  
  57. $CFG->directorypermissions = 0777;
  58.  
  59. $CFG->defaulthomepage = 0; // Our current JMX plan expects this.
  60.  
  61. require_once(dirname(__FILE__) . '/lib/setup.php');
  62.  
  63. // There is no php closing tag in this file,
  64. // it is intentional because it prevents trailing whitespace problems!
Advertisement
Add Comment
Please, Sign In to add comment