ILIAS
Release_4_2_x_branch Revision 61807
|
Data loader for load tests. More...
Public Member Functions | |
setEnableLog ($a_val) | |
Set enable log (currently echoes directly to the screen) | |
getEnableLog () | |
Get enable log. | |
log ($a_str) | |
Log. | |
generateUsers ($a_login_base="learner", $a_start=1, $a_end=1000, $a_firstname="John", $a_lastname_base="Learner", $a_pw="learnerpw", $a_email="de@de.de", $a_gender="m", $a_lang="en") | |
Generate Users. | |
generateCategories ($a_start=1, $a_end=500, $a_sub_cats_per_cat=10, $a_title_base="Category", $a_node="", $a_init_cnt=true, $a_depth=1) | |
Generate Categories. | |
generateCourses ($a_start=1, $a_end=500, $a_course_per_cat=10, $a_title_base="Course") | |
Generate courses. | |
generateFiles ($a_test_file, $a_files_per_course=10, $a_title_base="File") | |
Generate files. | |
generateCalendarEntries ($a_num_per_course=10) | |
Generate Calendar Entries. | |
loadSqlTemplate ($file) | |
Load SQL Template. | |
getline ($fp, $delim) | |
Get line from file. | |
createDump ($a_target_file, $a_dump_cmd, $a_db_user="root", $a_db_pw="", $a_db_name="loadtest") | |
Create dump. | |
writeUserCsv ($a_target_file, $a_user_base_name="learner") | |
Write User CSV. | |
writeCourseCsv ($a_target_file) | |
Write Course CSV. | |
writeCategoryCsv ($a_target_file) | |
Write Category CSV. | |
assignUsersAsCourseMembers ($a_user_login_base="learner", $a_start=1, $a_end=100) | |
Assign users as course members. | |
removeAllDesktopItems () | |
Remove all desktop items. | |
deactivateCalendarsOnPersonalDesktop () | |
Deactivate calendars on personal desktops. |
Data loader for load tests.
Initializes an ILIAS client with a number of users, objects etc.
Definition at line 12 of file class.ilDataLoader.php.
ilDataLoader::assignUsersAsCourseMembers | ( | $a_user_login_base = "learner" , |
|
$a_start = 1 , |
|||
$a_end = 100 |
|||
) |
Assign users as course members.
Definition at line 479 of file class.ilDataLoader.php.
References $ilDB, $rest, ilCourseParticipants\_getInstanceByObjId(), ilUtil\_getObjectsByOperations(), ilObject\_lookupObjId(), and log().
ilDataLoader::createDump | ( | $a_target_file, | |
$a_dump_cmd, | |||
$a_db_user = "root" , |
|||
$a_db_pw = "" , |
|||
$a_db_name = "loadtest" |
|||
) |
Create dump.
Definition at line 371 of file class.ilDataLoader.php.
ilDataLoader::deactivateCalendarsOnPersonalDesktop | ( | ) |
Deactivate calendars on personal desktops.
Definition at line 529 of file class.ilDataLoader.php.
ilDataLoader::generateCalendarEntries | ( | $a_num_per_course = 10 | ) |
Generate Calendar Entries.
@return |
Definition at line 237 of file class.ilDataLoader.php.
References ilUtil\_getObjectsByOperations(), ilCalendarCategories\_lookupCategoryIdByObjId(), ilObject\_lookupObjId(), IL_CAL_DAY, IL_CAL_HOUR, IL_CAL_UNIX, and log().
ilDataLoader::generateCategories | ( | $a_start = 1 , |
|
$a_end = 500 , |
|||
$a_sub_cats_per_cat = 10 , |
|||
$a_title_base = "Category" , |
|||
$a_node = "" , |
|||
$a_init_cnt = true , |
|||
$a_depth = 1 |
|||
) |
Generate Categories.
@return |
Definition at line 93 of file class.ilDataLoader.php.
References log().
ilDataLoader::generateCourses | ( | $a_start = 1 , |
|
$a_end = 500 , |
|||
$a_course_per_cat = 10 , |
|||
$a_title_base = "Course" |
|||
) |
Generate courses.
@return |
Definition at line 149 of file class.ilDataLoader.php.
References log(), and ilUtil\sortArray().
ilDataLoader::generateFiles | ( | $a_test_file, | |
$a_files_per_course = 10 , |
|||
$a_title_base = "File" |
|||
) |
Generate files.
@return |
Definition at line 196 of file class.ilDataLoader.php.
References ilUtil\_getObjectsByOperations(), and log().
ilDataLoader::generateUsers | ( | $a_login_base = "learner" , |
|
$a_start = 1 , |
|||
$a_end = 1000 , |
|||
$a_firstname = "John" , |
|||
$a_lastname_base = "Learner" , |
|||
$a_pw = "learnerpw" , |
|||
$a_email = "de@de.de" , |
|||
$a_gender = "m" , |
|||
$a_lang = "en" |
|||
) |
Generate Users.
@return |
Definition at line 55 of file class.ilDataLoader.php.
References IL_PASSWD_PLAIN, log(), and ilUtil\now().
ilDataLoader::getEnableLog | ( | ) |
Get enable log.
Definition at line 30 of file class.ilDataLoader.php.
Referenced by log().
ilDataLoader::getline | ( | $fp, | |
$delim | |||
) |
Get line from file.
Definition at line 353 of file class.ilDataLoader.php.
References $result.
Referenced by loadSqlTemplate().
ilDataLoader::loadSqlTemplate | ( | $file | ) |
Load SQL Template.
@return |
Definition at line 286 of file class.ilDataLoader.php.
References $file, $ilDB, getline(), and log().
ilDataLoader::log | ( | $a_str | ) |
Log.
@return |
Definition at line 41 of file class.ilDataLoader.php.
References getEnableLog().
Referenced by assignUsersAsCourseMembers(), createDump(), deactivateCalendarsOnPersonalDesktop(), generateCalendarEntries(), generateCategories(), generateCourses(), generateFiles(), generateUsers(), loadSqlTemplate(), removeAllDesktopItems(), writeCategoryCsv(), writeCourseCsv(), and writeUserCsv().
ilDataLoader::removeAllDesktopItems | ( | ) |
ilDataLoader::setEnableLog | ( | $a_val | ) |
Set enable log (currently echoes directly to the screen)
boolean | enable log |
Definition at line 20 of file class.ilDataLoader.php.
ilDataLoader::writeCategoryCsv | ( | $a_target_file | ) |
Write Category CSV.
@return |
Definition at line 452 of file class.ilDataLoader.php.
References $file, $ilDB, ilUtil\_getObjectsByOperations(), and log().
ilDataLoader::writeCourseCsv | ( | $a_target_file | ) |
Write Course CSV.
@return |
Definition at line 423 of file class.ilDataLoader.php.
References $file, $ilDB, ilUtil\_getObjectsByOperations(), and log().
ilDataLoader::writeUserCsv | ( | $a_target_file, | |
$a_user_base_name = "learner" |
|||
) |
Write User CSV.
@return |
Definition at line 392 of file class.ilDataLoader.php.
References $file, $ilDB, and log().