Improved performance logging 88/34688/13
authorNick Holland <nick.holland@partner.samsung.com>
Fri, 30 Jan 2015 11:55:29 +0000 (11:55 +0000)
committerNick Holland <nick.holland@partner.samsung.com>
Thu, 5 Feb 2015 13:31:55 +0000 (05:31 -0800)
commit5028362828cbbbeed545aa2e83c535cc4193d9c7
tree841f5adb9417c47b5cd6f776154e8752c15e03fc
parent8ae23532b4148d23fe5022383e3076e354460a8d
Improved performance logging

Seperated performance logging into 2 environment variables.
Plus added a new one for controlling the frequency of logging statistics

Before one environment variable would do multiple un-related things.

--DALI_LOG_PERFORMANCE_STATS--

A bitmask to control which DALi performance statstics are logged out.

The bitmask provided is
  LOG_EVERYTHING        ///< Bit 0 (1), log all statistics to the DALi log
  LOG_UPDATE_RENDER     ///< Bit 1 (2), log update and render statistics to the DALi log
  LOG_EVENT_PROCESS     ///< Bit 2 (4), log event task statistics to the DALi log
  LOG_CUSTOM_MARKERS    ///< Bit 3 (8), log custom marker statistics to the DALi log

Example output of running:  DALI_LOG_PERFORMANCE_STATS=1 dali-demo
with a custom PerformanceLogger for dali-demo TableView Initialize()

INFO: DALI: Update, min 0.20 ms, max 2.47 ms, total (0.1 secs), avg 0.54 ms, std dev 0.25 ms
INFO: DALI: Render, min 0.06 ms, max 19.10 ms, total (0.1 secs), avg 0.94 ms, std dev 1.86 ms
INFO: DALI: Event, min 0.01 ms, max 9.38 ms, total (0.0 secs), avg 0.66 ms, std dev 2.02 ms
INFO: DALI: DaliTableView, min 81.11 ms, max 81.11 ms, total (0.1 secs), avg 81.11 ms, std dev 0.00 ms

--DALI_LOG_PERFORMANCE_STATS_FREQ--
Used to control the frequency of DALI_LOG_PERFORMANCE_STATS, e.g.
to log the statistics out every 5 seconds:

DALI_LOG_PERFORMANCE_STATS_FREQ=5 DALI_LOG_PERFORMANCE_STATS=1 dali-demo

--DALI_PERFORMANCE_TIMESTAMP_OUTPUT--

A bitmask to enable logging of time stamped events.

  OUTPUT_DALI_LOG            ///< Bit 1 (1), log markers to DALi log
  OUTPUT_KERNEL_TRACE        ///< Bit 2 (2), log makers to kernel trace
  OUTPUT_SYSTEM_TRACE        ///< Bit 3 (4), log markers to system trace ( currently not supported)

Example output of: DALI_PERFORMANCE_TIMESTAMP_OUTPUT=1 dali-demo

INFO: DALI: 966735.553251 (seconds), V_SYNC
INFO: DALI: 966735.553279 (seconds), UPDATE_START
INFO: DALI: 966735.553872 (seconds), UPDATE_END
INFO: DALI: 966735.553890 (seconds), RENDER_START
INFO: DALI: 966735.553933 (seconds), PROCESS_EVENT_START
INFO: DALI: 966735.554011 (seconds), PROCESS_EVENT_END
INFO: DALI: 966735.567137 (seconds), RENDER_END
INFO: DALI: 966735.570027 (seconds), V_SYNC

Change-Id: I392e9d3312111ce2d037e91b821996f43b4b842c
16 files changed:
adaptors/base/environment-options.cpp
adaptors/base/environment-options.h
adaptors/base/environment-variables.h
adaptors/base/file.list
adaptors/base/interfaces/performance-interface.h
adaptors/base/performance-logging/frame-time-stamp.cpp
adaptors/base/performance-logging/performance-marker.cpp
adaptors/base/performance-logging/performance-marker.h
adaptors/base/performance-logging/performance-server.cpp
adaptors/base/performance-logging/performance-server.h
adaptors/base/performance-logging/statistics/stat-context-log-interface.h [new file with mode: 0644]
adaptors/base/performance-logging/statistics/stat-context-manager.cpp [new file with mode: 0644]
adaptors/base/performance-logging/statistics/stat-context-manager.h [new file with mode: 0644]
adaptors/base/performance-logging/statistics/stat-context.cpp [new file with mode: 0644]
adaptors/base/performance-logging/statistics/stat-context.h [new file with mode: 0644]
adaptors/common/adaptor-impl.cpp