Wireshark-commits: [Wireshark-commits] master-2.2 1eb6828: Add string function times to wmem_test.

From: Wireshark code review <code-review-do-not-reply@xxxxxxxxxxxxx>
Date: Tue, 30 Aug 2016 13:26:16 +0000 (UTC)
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=1eb6828a992a0d50e8a65c186294e1d31ab998d3
Submitter: Peter Wu (peter@xxxxxxxxxxxxx)
Changed: branch: master-2.2
Repository: wireshark

Commits:

1eb6828 by Gerald Combs (gerald@xxxxxxxxxxxxx):

    Add string function times to wmem_test.
    
    The system, GLib, and wmem string functions can perform differently,
    particularly on Windows. Start adding performance tests to wmem_test so
    that we can see the differences.
    
    With this change applied "wmem_test --verbose" prints out the following
    on a Windows 7 x64 VM here. wmem_test is linked against GLib 2.4.20.
    
    (MINPERF:g_printf_string_upper_bound (via g_snprintf) 1 string: u 327.602 ms s 0
    .000 ms)
    (MINPERF:g_printf_string_upper_bound (via g_snprintf) 5 strings: u 1419.609 ms s
     0.000 ms)
    (MINPERF:g_printf_string_upper_bound (via g_snprintf) mixed args: u 1606.810 ms
    s 0.000 ms)
    (MINPERF:_snprintf_s upper bound 1 string: u 124.801 ms s 0.000 ms)
    (MINPERF:_snprintf_s upper bound 5 strings: u 140.401 ms s 0.000 ms)
    (MINPERF:_snprintf_s upper bound mixed args: u 124.801 ms s 0.000 ms)
    (MINPERF:g_strdup_printf 2 strings: u 702.005 ms s 0.156 ms)
    (MINPERF:g_strconcat 2 strings: u 78.000 ms s 0.000 ms)
    (MINPERF:g_strdup_printf 5 strings: u 1419.609 ms s 0.156 ms)
    (MINPERF:g_strconcat 5 strings: u 93.601 ms s 0.156 ms)
    (MINPERF:wmem_strdup_printf 2 strings: u 343.202 ms s 0.312 ms)
    (MINPERF:wmem_strconcat 2 strings: u 93.601 ms s 0.468 ms)
    (MINPERF:wmem_strdup_printf 5 strings: u 327.602 ms s 8.268 ms)
    (MINPERF:wmem_strconcat 5 strings: u 62.400 ms s 3.432 ms)
    
    Change-Id: Id9b23918829db1719d141e7f830b9eba6245a25b
    Reviewed-on: https://code.wireshark.org/review/14857
    Reviewed-by: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Petri-Dish: Gerald Combs <gerald@xxxxxxxxxxxxx>
    Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
    Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
    (cherry picked from commit 183d7f3b78de30581390244a72c6ab328e6338f0)
    Reviewed-on: https://code.wireshark.org/review/17386
    Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
    

Actions performed:

    from  f3a5b33   extcap: Remove g_spawn_check_exit_status
    adds  1eb6828   Add string function times to wmem_test.


Summary of changes:
 epan/wmem/CMakeLists.txt |    2 +-
 epan/wmem/Makefile.am    |    3 +-
 epan/wmem/wmem_test.c    |  159 ++++++++++++++++++++++++++++++++++++++++++++++
 wsutil/time_util.c       |   30 +++++----
 wsutil/time_util.h       |   11 ++++
 5 files changed, 190 insertions(+), 15 deletions(-)