Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Issue 621883002: Adding a ToPrettyString method to ConvertableToTracedValue. (Closed)

Created:
6 years, 2 months ago by mithro-old
Modified:
6 years, 1 month ago
Reviewers:
nduca, JimSelf27, yurys
CC:
chromium-reviews, wfh+watch_chromium.org, dsinclair+watch_chromium.org, erikwright+watch_chromium.org, cc-bugs_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Adding a ToPrettyString method to ConvertableToTracedValue. Also adds a nice ToPrettyString method to TraceEventArgument which produces a much more human readable output. See the change in scheduler_state_machine_unittest which uses this feature. The output (trimmed) goes from; =============================================================== [ RUN      ] SchedulerStateMachineTest.TestAnimateAfterCommitBeforeDraw ../../cc/scheduler/scheduler_state_machine_unittest.cc:1792: Failure Value of: SchedulerStateMachine::ActionToString(state.NextAction())   Actual: "ACTION_DRAW_AND_SWAP_IF_POSSIBLE" Expected: SchedulerStateMachine::ActionToString(SchedulerStateMachine::ACTION_ANIMATE) Which is: "ACTION_ANIMATE" {"major_state":{"begin_impl_frame_state":"BEGIN_IMPL_FRAME_STATE_INSIDE_DEA DLINE","commit_state":"COMMIT_STATE_WAITING_FOR_ACTIVATION","forced_redraw_ ending_swaps_":0,"pending_tree_is_ready_for_activation":false,"skip_begin_m ain_frame_to_reduce_latency":false,"skip_next_begin_main_frame_to_reduce_la tency":false,"swap_used_incomplete_tile":false,"visible":true}} [  FAILED  ] SchedulerStateMachineTest.TestAnimateAfterCommitBeforeDraw (1 ms) =============================================================== To the much easier to read output (trimmed) below; =============================================================== [ RUN      ] SchedulerStateMachineTest.TestAnimateAfterCommitBeforeDraw ../../cc/scheduler/scheduler_state_machine_unittest.cc:1792: Failure Value of: SchedulerStateMachine::ActionToString(state.NextAction())   Actual: "ACTION_DRAW_AND_SWAP_IF_POSSIBLE" Expected: SchedulerStateMachine::ActionToString(SchedulerStateMachine::ACTION_ANIMATE) Which is: "ACTION_ANIMATE" {    "major_state": {       "begin_impl_frame_state": "BEGIN_IMPL_FRAME_STATE_INSIDE_DEADLINE",       "output_surface_state_": "OUTPUT_SURFACE_ACTIVE"    },    "major_timestamps_in_ms": {       "0_interval": 16.666,       "6_deadline": 208595868.986    },    "minor_state": {       "active_tree_needs_first_draw": false,       "visible": true    } } [  FAILED  ] SchedulerStateMachineTest.TestAnimateAfterCommitBeforeDraw (1 ms) ===============================================================

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -2 lines) Patch
M base/debug/trace_event_argument.h View 1 chunk +1 line, -0 lines 0 comments Download
M base/debug/trace_event_argument.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M base/debug/trace_event_impl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M base/debug/trace_event_impl.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M cc/scheduler/scheduler_state_machine_unittest.cc View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 7 (2 generated)
mithro-old
Hi Nat / Yury, This is a very small addition to the tracing to support ...
6 years, 2 months ago (2014-10-01 15:16:47 UTC) #2
dsinclair
On 2014/10/01 15:16:47, mithro wrote: > Hi Nat / Yury, > > This is a ...
6 years, 2 months ago (2014-10-01 17:39:45 UTC) #3
yurys
The idea of having TracedValue was to eventually change the implementation so that it writes ...
6 years, 2 months ago (2014-10-02 12:07:05 UTC) #4
JimSelf27
6 years, 2 months ago (2014-10-11 10:51:47 UTC) #6
JimSelf27
6 years, 2 months ago (2014-10-11 10:51:48 UTC) #7

          

Powered by Google App Engine
This is Rietveld 408576698