Y-lib
Loadrunner libraries
|
Collection of miscellaneous support functions. More...
#include "y_core.c"
Go to the source code of this file.
Macros | |
#define | y_breadcrumb_reset() lr_save_string("", "breadcrumb") |
Resets the breadcrumb Use this macro to start a new breadcrumb or to reset an existing one. More... | |
#define | y_delay_once(delay_in_seconds) |
Delay for delay_in_seconds seconds, once. This macro will put the code to sleep for the specified amount of seconds, but only the first time the current position in the code is reached. If you use this in more than one place each of the calls will sleep exactly once. More... | |
Functions | |
static unsigned long | y_hash_sdbm (char *str) |
Create a hash of string input. More... | |
int | y_rand_in_sliding_window (int lowerbound, int upperbound, int rand_max) |
Generate random number and test if it lies between 2 given boundaries. More... | |
int | y_rand_between (int lowerbound, int upperbound) |
Create a random number between two boundaries. (the boundaries are included!) More... | |
int | y_save_attribute_to_parameter (char *attrib, char *param) |
Fetch attribute from vUser's command line and store it in a parameter. This will fetch an attribute from the vUser's command line (as set in the scenario or in runtime settings as additional attributes) and stores it in the given parameter. More... | |
int | y_save_attribute (char *param) |
Fetch attribute from vUser's command lin and store it in a parameter of the same name. This will fetch an attribute from the vUser's command line (as set in the scenario or in runtime settings (addition attributes)) and stores it in a parameter of the same name. This function is a shortcut to y_save_attribute_to_parameter() More... | |
void | y_log_rendezvous_result (int result) |
Process the result code of lr_rendezvous() call to log human readable errors. More... | |
void | y_breadcrumb (char *breadcrumb) |
Keep track of the steps in the script. More... | |
int | y_write_to_file (char *filename, char *content) |
Write a string to a file. More... | |
int | y_write_parameter_to_file (char *filename, char *content_parameter) |
Write the content of a parameter to a file. More... | |
void | y_datetime () |
Saves the current date/time into a LR-parameter. More... | |
int | y_workdays_from_today (int workdays) |
Calculate the difference in days between today and X workdays into the future. More... | |
void | y_get_disk_space (const char *folder_name, double *available, double *total) |
Get the free disk space on the target folder on the load generator. More... | |
double | y_get_free_disk_space_in_mebibytes (const char *folder_name) |
Get the amount of free disk space in the target folder in mebibytes (SI unit) More... | |
double | y_get_free_disk_space_percentage (const char *folder_name) |
Get the free disk space percentage on the target folder on the load generator. More... | |
int | y_read_file_into_parameter (char *filename, char *param) |
Read the contents of a file into a single parameter. More... | |
void | y_user_data_point (char *param) |
Create a user data point for a parameter. More... | |
double | y_get_current_time () |
Get the current time in seconds since 1970, as a double. More... | |
double | y_delay_until (double timestamp) |
Delay until a certain time. More... | |
double | y_think_time_for_rampup_ext (int rampup_period, double TPS_initial, double TPS_max, int virtual_users) |
Ramp up the load by using varying amounts of think time instead of virtual users. More... | |
double | y_think_time_for_rampup (const int rampup_period, double TPS_max) |
Ramp up the load by using varying amounts of think time instead of virtual users. For simulating situations with limited amounts of connections on the client side. More... | |
y_execute_shell_command (char *command, int debug) | |
Execute a windows shell command Implements proper error checking. More... | |
int | y_errorcheck (int ok) |
Errorflood guard. Also known as "the error check". More... | |
double | y_pace (double pacing_time_in_seconds) |
Improved implementation of loadrunner pacing. More... | |
double | y_pace_rnd (double min_pacing_time_in_seconds, double max_pacing_time_in_seconds) |
Improved implementation of loadrunner pacing - with semirandomized pacing. More... | |
Collection of miscellaneous support functions.
This file contains loadrunner specific helper functions. If we don't have somewhere else to put some piece of code, this is where it will probably end up.
Definition in file y_loadrunner_utils.c.