Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
ast_sched performance test module More...
#include "asterisk.h"
#include <inttypes.h>
#include "asterisk/module.h"
#include "asterisk/utils.h"
#include "asterisk/sched.h"
#include "asterisk/test.h"
#include "asterisk/cli.h"
#include "asterisk/astobj2.h"
Go to the source code of this file.
Data Structures | |
struct | test_obj |
Macros | |
#define | DELAYED_SAME_EXPIRE 300 /* ms */ |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (sched_test_freebird) | |
AST_TEST_DEFINE (sched_test_order) | |
static char * | handle_cli_sched_bench (struct ast_cli_entry *e, int cmd, struct ast_cli_args *a) |
static int | load_module (void) |
static int | lockingcb (const void *data) |
static int | sched_cb (const void *data) |
static int | sched_order_1_cb (const void *data) |
static int | sched_order_2_cb (const void *data) |
static int | sched_order_3_cb (const void *data) |
static int | sched_order_4_cb (const void *data) |
static int | sched_order_5_cb (const void *data) |
static int | sched_order_6_cb (const void *data) |
static int | sched_order_7_cb (const void *data) |
static int | sched_order_8_cb (const void *data) |
static void | sched_order_check (struct ast_test *test, int order) |
static void | test_obj_cleanup (void *data) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "ast_sched performance test module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
static struct ast_cli_entry | cli_sched [] |
static int | order_check |
static int | order_check_failed |
ast_sched performance test module
Definition in file test_sched.c.
#define DELAYED_SAME_EXPIRE 300 /* ms */ |
|
static |
Definition at line 486 of file test_sched.c.
|
static |
Definition at line 486 of file test_sched.c.
struct ast_module * AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 486 of file test_sched.c.
AST_TEST_DEFINE | ( | sched_test_freebird | ) |
Definition at line 376 of file test_sched.c.
References ao2_alloc, ao2_cleanup, ao2_ref, ast_cond_wait, ast_mutex_lock, ast_mutex_unlock, ast_sched_add(), ast_sched_context_create(), ast_sched_context_destroy(), AST_SCHED_DEL_UNREF, ast_sched_start_thread(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, test_obj::cond, test_obj::id, sip_to_pjsip::info(), test_obj::lock, lockingcb(), test_obj::scheduledCBstarted, TEST_EXECUTE, TEST_INIT, and test_obj_cleanup().
AST_TEST_DEFINE | ( | sched_test_order | ) |
Definition at line 108 of file test_sched.c.
References ast_sched_add(), ast_sched_context_create(), ast_sched_context_destroy(), ast_sched_del(), ast_sched_runq(), ast_sched_wait(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, DELAYED_SAME_EXPIRE, sip_to_pjsip::info(), NULL, order_check, order_check_failed, sched_cb(), sched_order_1_cb(), sched_order_2_cb(), sched_order_3_cb(), sched_order_4_cb(), sched_order_5_cb(), sched_order_6_cb(), sched_order_7_cb(), sched_order_8_cb(), TEST_EXECUTE, and TEST_INIT.
|
static |
Definition at line 266 of file test_sched.c.
References a, ast_cli_entry::args, ast_cli(), ast_free, ast_malloc, ast_random(), ast_sched_add(), ast_sched_context_create(), ast_sched_context_destroy(), ast_sched_del(), ast_tvdiff_us(), ast_tvnow(), CLI_FAILURE, CLI_GENERATE, CLI_INIT, CLI_SHOWUSAGE, CLI_SUCCESS, ast_cli_entry::command, NULL, sched_cb(), and ast_cli_entry::usage.
|
static |
Definition at line 478 of file test_sched.c.
References ARRAY_LEN, ast_cli_register_multiple, AST_MODULE_LOAD_SUCCESS, AST_TEST_REGISTER, and cli_sched.
|
static |
Definition at line 354 of file test_sched.c.
References ao2_ref, ast_cond_signal, ast_mutex_lock, ast_mutex_unlock, test_obj::cond, test_obj::lock, and test_obj::scheduledCBstarted.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 42 of file test_sched.c.
Referenced by AST_TEST_DEFINE(), and handle_cli_sched_bench().
|
static |
Definition at line 60 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 66 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 72 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 78 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 84 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 90 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 96 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 102 of file test_sched.c.
References sched_order_check().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 50 of file test_sched.c.
References ast_test_status_update, order, order_check, and order_check_failed.
Referenced by sched_order_1_cb(), sched_order_2_cb(), sched_order_3_cb(), sched_order_4_cb(), sched_order_5_cb(), sched_order_6_cb(), sched_order_7_cb(), and sched_order_8_cb().
|
static |
Definition at line 347 of file test_sched.c.
References ast_cond_destroy, ast_mutex_destroy, test_obj::cond, and test_obj::lock.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 470 of file test_sched.c.
References ARRAY_LEN, ast_cli_unregister_multiple(), AST_TEST_UNREGISTER, and cli_sched.
|
static |
Definition at line 486 of file test_sched.c.
|
static |
Definition at line 486 of file test_sched.c.
|
static |
Definition at line 466 of file test_sched.c.
Referenced by load_module(), and unload_module().
|
static |
Definition at line 47 of file test_sched.c.
Referenced by AST_TEST_DEFINE(), and sched_order_check().
|
static |
Definition at line 48 of file test_sched.c.
Referenced by AST_TEST_DEFINE(), and sched_order_check().