[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/+/1997137
Reviewed-by: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65727}
This commit is contained in:
Sigurd Schneider 2020-01-13 13:16:18 +01:00 committed by Commit Bot
parent 8ec2a71ad7
commit 8b7113bf3c
2 changed files with 4 additions and 4 deletions

View File

@ -825,7 +825,7 @@ domain Profiler
# Collect block-based coverage.
optional boolean detailed
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
# Enable type profile.
@ -849,7 +849,7 @@ domain Profiler
returns
# Coverage data for the current isolate.
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
# Collect type profile.

View File

@ -300,7 +300,7 @@ Response V8ProfilerAgentImpl::startPreciseCoverage(Maybe<bool> callCount,
if (!m_enabled) return Response::Error("Profiler is not enabled");
*out_timestamp =
(v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks())
.InMilliseconds();
.InSecondsF();
bool callCountValue = callCount.fromMaybe(false);
bool detailedValue = detailed.fromMaybe(false);
m_state->setBoolean(ProfilerAgentState::preciseCoverageStarted, true);
@ -412,7 +412,7 @@ Response V8ProfilerAgentImpl::takePreciseCoverage(
v8::debug::Coverage coverage = v8::debug::Coverage::CollectPrecise(m_isolate);
*out_timestamp =
(v8::base::TimeTicks::HighResolutionNow() - v8::base::TimeTicks())
.InMilliseconds();
.InSecondsF();
return coverageToProtocol(m_session->inspector(), coverage, out_result);
}