Navigation


Changeset 974:2091bf698fb1 in freeDiameter for extensions/test_app


Ignore:
Timestamp:
Mar 15, 2013, 2:14:35 AM (11 years ago)
Author:
Thomas Klausner <tk@giga.or.at>
Branch:
default
Phase:
public
Message:

Remove newlines from fd_log_debug, TRACE_DEBUG, TRACE_ERROR, and TRACE_DEBUG_ERROR
(as far as sed could find them)
with manual fixing afterwards.

Location:
extensions/test_app
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • extensions/test_app/ta_bench.c

    r928 r974  
    236236       
    237237        /* Now, display the statistics */
    238         fd_log_debug( "------- app_test Benchmark result ---------\n");
     238        fd_log_debug( "------- app_test Benchmark result ---------");
    239239        if (now.tv_nsec >= end_time.tv_nsec) {
    240                 fd_log_debug( " Executing for: %d.%06ld sec\n",
     240                fd_log_debug( " Executing for: %d.%06ld sec",
    241241                                (int)(now.tv_sec + ta_conf->bench_duration - end_time.tv_sec),
    242242                                (long)(now.tv_nsec - end_time.tv_nsec) / 1000);
    243243        } else {
    244                 fd_log_debug( " Executing for: %d.%06ld sec\n",
     244                fd_log_debug( " Executing for: %d.%06ld sec",
    245245                                (int)(now.tv_sec + ta_conf->bench_duration - 1 - end_time.tv_sec),
    246246                                (long)(now.tv_nsec + 1000000000 - end_time.tv_nsec) / 1000);
    247247        }
    248         fd_log_debug( "   %llu messages sent\n", end.nb_sent - start.nb_sent);
    249         fd_log_debug( "   %llu error(s) received\n", end.nb_errs - start.nb_errs);
    250         fd_log_debug( "   %llu answer(s) received\n", end.nb_recv - start.nb_recv);
    251         fd_log_debug( "   Overall:\n");
    252         fd_log_debug( "     fastest: %ld.%06ld sec.\n", end.shortest / 1000000, end.shortest % 1000000);
    253         fd_log_debug( "     slowest: %ld.%06ld sec.\n", end.longest / 1000000, end.longest % 1000000);
    254         fd_log_debug( "     Average: %ld.%06ld sec.\n", end.avg / 1000000, end.avg % 1000000);
    255         fd_log_debug( "   Throughput: %llu messages / sec\n", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000)));
    256         fd_log_debug( "-------------------------------------\n");
     248        fd_log_debug( "   %llu messages sent", end.nb_sent - start.nb_sent);
     249        fd_log_debug( "   %llu error(s) received", end.nb_errs - start.nb_errs);
     250        fd_log_debug( "   %llu answer(s) received", end.nb_recv - start.nb_recv);
     251        fd_log_debug( "   Overall:");
     252        fd_log_debug( "     fastest: %ld.%06ld sec.", end.shortest / 1000000, end.shortest % 1000000);
     253        fd_log_debug( "     slowest: %ld.%06ld sec.", end.longest / 1000000, end.longest % 1000000);
     254        fd_log_debug( "     Average: %ld.%06ld sec.", end.avg / 1000000, end.avg % 1000000);
     255        fd_log_debug( "   Throughput: %llu messages / sec", (end.nb_recv - start.nb_recv) / (( now.tv_sec + ta_conf->bench_duration - end_time.tv_sec ) + ((now.tv_nsec - end_time.tv_nsec) / 1000000000)));
     256        fd_log_debug( "-------------------------------------");
    257257
    258258}
  • extensions/test_app/ta_conf.l

    r740 r974  
    8181                                if (ret != 1) {
    8282                                        /* No matching: an error occurred */
    83                                         fd_log_debug("Unable to convert the value '%s' to a valid number: %s\n", yytext, strerror(errno));
     83                                        fd_log_debug("Unable to convert the value '%s' to a valid number: %s", yytext, strerror(errno));
    8484                                        return LEX_ERROR; /* trig an error in yacc parser */
    8585                                        /* Maybe we could REJECT instead of failing here? */
     
    9393                                yylval->string = strdup(yytext+1);
    9494                                if (!yylval->string) {
    95                                         fd_log_debug("Unable to copy the string '%s': %s\n", yytext, strerror(errno));
     95                                        fd_log_debug("Unable to copy the string '%s': %s", yytext, strerror(errno));
    9696                                        TRACE_DEBUG(INFO, "strdup failed");
    9797                                        return LEX_ERROR; /* trig an error in yacc parser */
     
    163163        /* Unrecognized sequence, if it did not match any previous pattern */
    164164[^[:space:]"*=>;\n]+    {
    165                                 fd_log_debug("Unrecognized text on line %d col %d: '%s'.\n", yylloc->first_line, yylloc->first_column, yytext);
     165                                fd_log_debug("Unrecognized text on line %d col %d: '%s'.", yylloc->first_line, yylloc->first_column, yytext);
    166166                                return LEX_ERROR;
    167167                        }
  • extensions/test_app/ta_conf.y

    r740 r974  
    7272        if (ta_confin == NULL) {
    7373                ret = errno;
    74                 fd_log_debug("Unable to open extension configuration file %s for reading: %s\n", conffile, strerror(ret));
     74                fd_log_debug("Unable to open extension configuration file %s for reading: %s", conffile, strerror(ret));
    7575                TRACE_DEBUG (INFO, "Error occurred, message logged -- configuration file.");
    7676                return ret;
     
    9898       
    9999        if (ploc->first_line != ploc->last_line)
    100                 fd_log_debug("%s:%d.%d-%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
     100                fd_log_debug("%s:%d.%d-%d.%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_line, ploc->last_column, s);
    101101        else if (ploc->first_column != ploc->last_column)
    102                 fd_log_debug("%s:%d.%d-%d : %s\n", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
     102                fd_log_debug("%s:%d.%d-%d : %s", conffile, ploc->first_line, ploc->first_column, ploc->last_column, s);
    103103        else
    104                 fd_log_debug("%s:%d.%d : %s\n", conffile, ploc->first_line, ploc->first_column, s);
     104                fd_log_debug("%s:%d.%d : %s", conffile, ploc->first_line, ploc->first_column, s);
    105105}
    106106
  • extensions/test_app/ta_serv.c

    r741 r974  
    4747        TRACE_ENTRY("%p %p %p %p", msg, avp, sess, act);
    4848       
    49         fd_log_debug("Unexpected message received!\n");
     49        fd_log_debug("Unexpected message received!");
    5050       
    5151        return ENOTSUP;
  • extensions/test_app/test_app.c

    r741 r974  
    7272        if (!TRACE_BOOL(INFO))
    7373                return;
    74         fd_log_debug( "------- app_test configuration dump: ---------\n");
    75         fd_log_debug( " Vendor Id .......... : %u\n", ta_conf->vendor_id);
    76         fd_log_debug( " Application Id ..... : %u\n", ta_conf->appli_id);
    77         fd_log_debug( " Command Id ......... : %u\n", ta_conf->cmd_id);
    78         fd_log_debug( " AVP Id ............. : %u\n", ta_conf->avp_id);
    79         fd_log_debug( " Mode ............... : %s%s%s\n", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "",  ta_conf->mode & MODE_BENCH ? " (Benchmark)" : "");
    80         fd_log_debug( " Destination Realm .. : %s\n", ta_conf->dest_realm ?: "- none -");
    81         fd_log_debug( " Destination Host ... : %s\n", ta_conf->dest_host ?: "- none -");
    82         fd_log_debug( " Signal ............. : %i\n", ta_conf->signal);
    83         fd_log_debug( "------- /app_test configuration dump ---------\n");
     74        fd_log_debug( "------- app_test configuration dump: ---------");
     75        fd_log_debug( " Vendor Id .......... : %u", ta_conf->vendor_id);
     76        fd_log_debug( " Application Id ..... : %u", ta_conf->appli_id);
     77        fd_log_debug( " Command Id ......... : %u", ta_conf->cmd_id);
     78        fd_log_debug( " AVP Id ............. : %u", ta_conf->avp_id);
     79        fd_log_debug( " Mode ............... : %s%s%s", ta_conf->mode & MODE_SERV ? "Serv" : "", ta_conf->mode & MODE_CLI ? "Cli" : "",  ta_conf->mode & MODE_BENCH ? " (Benchmark)" : "");
     80        fd_log_debug( " Destination Realm .. : %s", ta_conf->dest_realm ?: "- none -");
     81        fd_log_debug( " Destination Host ... : %s", ta_conf->dest_host ?: "- none -");
     82        fd_log_debug( " Signal ............. : %i", ta_conf->signal);
     83        fd_log_debug( "------- /app_test configuration dump ---------");
    8484}
    8585
     
    107107               
    108108                /* Now, display everything */
    109                 fd_log_debug( "------- app_test statistics ---------\n");
     109                fd_log_debug( "------- app_test statistics ---------");
    110110                if (now.tv_nsec >= start.tv_nsec) {
    111                         fd_log_debug( " Executing for: %d.%06ld sec\n",
     111                        fd_log_debug( " Executing for: %d.%06ld sec",
    112112                                        (int)(now.tv_sec - start.tv_sec),
    113113                                        (long)(now.tv_nsec - start.tv_nsec) / 1000);
    114114                } else {
    115                         fd_log_debug( " Executing for: %d.%06ld sec\n",
     115                        fd_log_debug( " Executing for: %d.%06ld sec",
    116116                                        (int)(now.tv_sec - 1 - start.tv_sec),
    117117                                        (long)(now.tv_nsec + 1000000000 - start.tv_nsec) / 1000);
     
    119119               
    120120                if (ta_conf->mode & MODE_SERV) {
    121                         fd_log_debug( " Server: %llu message(s) echoed\n", copy.nb_echoed);
     121                        fd_log_debug( " Server: %llu message(s) echoed", copy.nb_echoed);
    122122                }
    123123                if (ta_conf->mode & MODE_CLI) {
    124                         fd_log_debug( " Client:\n");
    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);
    128                         fd_log_debug( "     fastest: %ld.%06ld sec.\n", copy.shortest / 1000000, copy.shortest % 1000000);
    129                         fd_log_debug( "     slowest: %ld.%06ld sec.\n", copy.longest / 1000000, copy.longest % 1000000);
    130                         fd_log_debug( "     Average: %ld.%06ld sec.\n", copy.avg / 1000000, copy.avg % 1000000);
     124                        fd_log_debug( " Client:");
     125                        fd_log_debug( "   %llu message(s) sent", copy.nb_sent);
     126                        fd_log_debug( "   %llu error(s) received", copy.nb_errs);
     127                        fd_log_debug( "   %llu answer(s) received", copy.nb_recv);
     128                        fd_log_debug( "     fastest: %ld.%06ld sec.", copy.shortest / 1000000, copy.shortest % 1000000);
     129                        fd_log_debug( "     slowest: %ld.%06ld sec.", copy.longest / 1000000, copy.longest % 1000000);
     130                        fd_log_debug( "     Average: %ld.%06ld sec.", copy.avg / 1000000, copy.avg % 1000000);
    131131                }
    132                 fd_log_debug( "-------------------------------------\n");
     132                fd_log_debug( "-------------------------------------");
    133133        }
    134134       
Note: See TracChangeset for help on using the changeset viewer.