Navigation


Changeset 575:66f188b3ca84 in freeDiameter for extensions/test_app/test_app.c


Ignore:
Timestamp:
Oct 8, 2010, 4:02:48 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Configurable parameters for the benchmark mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/test_app.c

    r572 r575  
    5959        ta_conf->dest_host  = NULL;
    6060        ta_conf->signal     = TEST_APP_DEFAULT_SIGNAL;
     61        ta_conf->bench_concur   = 100;
     62        ta_conf->bench_duration = 10;
    6163       
    6264        /* Initialize the mutex */
     
    8284}
    8385
    84 /* Function to display statistics every 10 seconds */
     86/* Function to display statistics periodically */
    8587static void * ta_stats(void * arg) {
    8688
     
    9395        /* Now, loop until canceled */
    9496        while (1) {
    95                 /* Display statistics every 30 seconds */
    96                 sleep(30);
     97                /* Display statistics every XX seconds */
     98                sleep(ta_conf->bench_duration * 3);
    9799               
    98100                /* Now, get the current stats */
     
    117119               
    118120                if (ta_conf->mode & MODE_SERV) {
    119                         fd_log_debug( " Server: %llu messages echoed\n", copy.nb_echoed);
     121                        fd_log_debug( " Server: %llu message(s) echoed\n", copy.nb_echoed);
    120122                }
    121123                if (ta_conf->mode & MODE_CLI) {
    122124                        fd_log_debug( " Client:\n");
    123                         fd_log_debug( "   %llu messages sent\n", copy.nb_sent);
    124                         fd_log_debug( "   %llu errors received\n", copy.nb_errs);
    125                         fd_log_debug( "   %llu answers received\n", copy.nb_recv);
     125                        fd_log_debug( "   %llu message(s) sent\n", copy.nb_sent);
     126                        fd_log_debug( "   %llu error(s) received\n", copy.nb_errs);
     127                        fd_log_debug( "   %llu answer(s) received\n", copy.nb_recv);
    126128                        fd_log_debug( "     fastest: %ld.%06ld sec.\n", copy.shortest / 1000000, copy.shortest % 1000000);
    127129                        fd_log_debug( "     slowest: %ld.%06ld sec.\n", copy.longest / 1000000, copy.longest % 1000000);
Note: See TracChangeset for help on using the changeset viewer.