Commit 8b7113bf authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[coverage] Change time format in recently added protocol messages

The time was reported in milliseconds, but should be reported in seconds
instead.

TBR=ulan@chromium.org, szuend@chromium.org

Change-Id: I171cdb0107cd522b0d62ac6ed4edfacf7599da0b
Bug: chromium:1022031
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1997137Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarSimon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65727}
parent 8ec2a71a
...@@ -825,7 +825,7 @@ domain Profiler ...@@ -825,7 +825,7 @@ domain Profiler
# Collect block-based coverage. # Collect block-based coverage.
optional boolean detailed optional boolean detailed
returns returns
# The timestamp (in milliseconds) the coverage update was taken in the backend. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
number timestamp number timestamp
# Enable type profile. # Enable type profile.
...@@ -849,7 +849,7 @@ domain Profiler ...@@ -849,7 +849,7 @@ domain Profiler
returns returns
# Coverage data for the current isolate. # Coverage data for the current isolate.
array of ScriptCoverage result array of ScriptCoverage result
# The timestamp (in milliseconds) the coverage update was taken in the backend. # Monotonically increasing time (in seconds) when the coverage update was taken in the backend.
number timestamp number timestamp
# Collect type profile. # Collect type profile.
......
...@@ -300,7 +300,7 @@ Response V8ProfilerAgentImpl::startPreciseCoverage(Maybe<bool> callCount, ...@@ -300,7 +300,7 @@ Response V8ProfilerAgentImpl::startPreciseCoverage(Maybe<bool> callCount,
if (!m_enabled) return Response::Error("Profiler is not enabled"); if (!m_enabled) return Response::Error("Profiler is not enabled");
*out_timestamp = *out_timestamp =
(v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks()) (v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks())
.InMilliseconds(); .InSecondsF();
bool callCountValue = callCount.fromMaybe(false); bool callCountValue = callCount.fromMaybe(false);
bool detailedValue = detailed.fromMaybe(false); bool detailedValue = detailed.fromMaybe(false);
m_state->setBoolean(ProfilerAgentState::preciseCoverageStarted, true); m_state->setBoolean(ProfilerAgentState::preciseCoverageStarted, true);
...@@ -412,7 +412,7 @@ Response V8ProfilerAgentImpl::takePreciseCoverage( ...@@ -412,7 +412,7 @@ Response V8ProfilerAgentImpl::takePreciseCoverage(
v8::debug::Coverage coverage = v8::debug::Coverage::CollectPrecise(m_isolate); v8::debug::Coverage coverage = v8::debug::Coverage::CollectPrecise(m_isolate);
*out_timestamp = *out_timestamp =
(v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks()) (v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks())
.InMilliseconds(); .InSecondsF();
return coverageToProtocol(m_session->inspector(), coverage, out_result); return coverageToProtocol(m_session->inspector(), coverage, out_result);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment