Generates the files required by JMeter.
More...
|
int const | DEFAULT_SIZE = 3 |
| Default size index.
|
|
int const | MAX_SIZE = 5 |
| Highest (largest) size index.
|
|
int const | MIN_SIZE = 0 |
| Lowest (smallest) size index.
|
|
|
| dot ($number, $total) |
| Outputs dots. More...
|
|
| end_log () |
| Ends a log string that was started using log function with $leaveopen.
|
|
| log ($langstring, $a=null, $leaveopen=false) |
| Displays information as part of progress. More...
|
|
|
int bool | $filesizelimit |
| Maximum number of bytes for file.
|
|
bool | $fixeddataset |
| True if we want a fixed dataset or false to generate random data.
|
|
int | $lastdot |
| Epoch time at which last dot was displayed.
|
|
int | $lastpercentage |
| Epoch time at which last percentage was displayed.
|
|
bool | $progress |
| True if displaying progress.
|
|
int | $size |
| Size code (index in the above arrays)
|
|
int | $starttime |
| Epoch time at which current step (current set of dots) started.
|
|
|
static Number | $loops = array(5, 5, 5, 6, 6, 7) |
| of loops depending on the selected size.
|
|
static Rampup | $rampups = array(1, 6, 40, 100, 500, 800) |
| period depending on the selected size.
|
|
static The | $repourl = 'https://github.com/moodlehq/moodle-performance-comparison' |
| URL to the repository of the external project.
|
|
static Number | $users = array(1, 30, 100, 1000, 5000, 10000) |
| of users depending on the selected size.
|
|
Generates the files required by JMeter.
- Copyright
- 2013 David MonllaĆ³
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ create_testplan_file()
static tool_generator_testplan_backend::create_testplan_file |
( |
|
$courseid, |
|
|
|
$size |
|
) |
| |
|
static |
Creates the test plan file.
- Parameters
-
int | $courseid | The target course id |
int | $size | The test plan size |
- Return values
-
◆ create_users_file()
static tool_generator_testplan_backend::create_users_file |
( |
|
$courseid, |
|
|
|
$updateuserspassword |
|
) |
| |
|
static |
Creates the users data file.
- Parameters
-
int | $courseid | The target course id |
bool | $updateuserspassword | Updates the course users password to $CFG->tool_generator_users_password |
- Return values
-
◆ dot()
tool_generator_backend::dot |
( |
|
$number, |
|
|
|
$total |
|
) |
| |
|
protectedinherited |
Outputs dots.
There is up to one dot per second. Once a minute, it displays a percentage.
- Parameters
-
int | $number | Number of completed items |
int | $total | Total number of items to complete |
◆ generate_test_plan()
static tool_generator_testplan_backend::generate_test_plan |
( |
|
$targetcourseid, |
|
|
|
$size |
|
) |
| |
|
staticprotected |
Generates the test plan according to the target course contents.
- Parameters
-
int | $targetcourseid | The target course id |
int | $size | The test plan size |
- Return values
-
string | The test plan as a string |
◆ generate_users_file()
static tool_generator_testplan_backend::generate_users_file |
( |
|
$targetcourseid, |
|
|
|
$updateuserspassword |
|
) |
| |
|
staticprotected |
Generates the user's credentials file with all the course's users.
- Parameters
-
int | $targetcourseid | |
bool | $updateuserspassword | Updates the course users password to $CFG->tool_generator_users_password |
- Return values
-
string | The users csv file contents. |
◆ get_course_test_data()
static tool_generator_testplan_backend::get_course_test_data |
( |
|
$targetcourseid | ) |
|
|
staticprotected |
Gets the data required to fill the test plan template with the database contents.
- Parameters
-
int | $targetcourseid | The target course id |
- Return values
-
stdClass | The ids required by the test plan |
◆ get_file_record()
static tool_generator_testplan_backend::get_file_record |
( |
|
$filearea, |
|
|
|
$filetype |
|
) |
| |
|
staticprotected |
Returns a tool_generator file record.
- Parameters
-
string | $filearea | testplan or users |
string | $filetype | The file extension jmx or csv |
- Return values
-
stdClass | The file record to use when creating tool_generator files |
◆ get_repourl()
static tool_generator_testplan_backend::get_repourl |
( |
| ) |
|
|
static |
Getter for moodle-performance-comparison project URL.
- Return values
-
◆ get_size_choices()
static tool_generator_testplan_backend::get_size_choices |
( |
| ) |
|
|
static |
Gets a list of size choices supported by this backend.
- Return values
-
array | List of size (int) => text description for display |
◆ has_selected_course_any_problem()
static tool_generator_testplan_backend::has_selected_course_any_problem |
( |
|
$course, |
|
|
|
$size |
|
) |
| |
|
static |
Checks if the selected target course is ok.
- Parameters
-
int | string | $course | |
int | $size | |
- Return values
-
array | Errors array or false if everything is ok |
◆ log()
tool_generator_backend::log |
( |
|
$langstring, |
|
|
|
$a = null , |
|
|
|
$leaveopen = false |
|
) |
| |
|
protectedinherited |
Displays information as part of progress.
- Parameters
-
string | $langstring | Part of langstring (after progress_) |
mixed | $a | Optional lang string parameters |
bool | $leaveopen | If true, doesn't close LI tag (ready for dots) |
◆ size_for_name()
static tool_generator_backend::size_for_name |
( |
|
$sizename | ) |
|
|
staticinherited |
Converts a size name into the numeric constant.
- Parameters
-
string | $sizename | Size name e.g. 'L' |
- Return values
-
- Exceptions
-
The documentation for this class was generated from the following file: