Commit 0175a57f authored by Nicolás Peña Moreno's avatar Nicolás Peña Moreno Committed by Commit Bot

Remove LongTaskV2 flag

We do not intend to ship this feature, so remove the flag and some of
the associated code. A followup CL will remove SubTaskAttributions and
code used to compute them.

Bug: 738493
Change-Id: I6b036e5d308bf8e555f5d5c76874e12458a028c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1853124Reviewed-by: default avatarTom McKee <tommckee@chromium.org>
Reviewed-by: default avatarSteve Kobes <skobes@chromium.org>
Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706448}
parent 21151b79
...@@ -23,21 +23,10 @@ PerformanceLongTaskTiming::PerformanceLongTaskTiming( ...@@ -23,21 +23,10 @@ PerformanceLongTaskTiming::PerformanceLongTaskTiming(
const SubTaskAttribution::EntriesVector& sub_task_attributions) const SubTaskAttribution::EntriesVector& sub_task_attributions)
: PerformanceEntry(name, start_time, end_time) { : PerformanceEntry(name, start_time, end_time) {
// Only one possible container type exists currently: "iframe". // Only one possible container type exists currently: "iframe".
if (RuntimeEnabledFeatures::LongTaskV2Enabled()) { TaskAttributionTiming* attribution_entry =
for (auto&& it : sub_task_attributions) { TaskAttributionTiming::Create("unknown", "iframe", culprit_frame_src,
TaskAttributionTiming* attribution_entry = TaskAttributionTiming::Create( culprit_frame_id, culprit_frame_name);
it->subTaskName(), "iframe", culprit_frame_src, culprit_frame_id, attribution_.push_back(*attribution_entry);
culprit_frame_name, it->highResStartTime(),
it->highResStartTime() + it->highResDuration(), it->scriptURL());
attribution_.push_back(*attribution_entry);
}
} else {
// Only one possible task type exists currently: "script".
TaskAttributionTiming* attribution_entry =
TaskAttributionTiming::Create("unknown", "iframe", culprit_frame_src,
culprit_frame_id, culprit_frame_name);
attribution_.push_back(*attribution_entry);
}
} }
PerformanceLongTaskTiming::~PerformanceLongTaskTiming() = default; PerformanceLongTaskTiming::~PerformanceLongTaskTiming() = default;
......
...@@ -14,16 +14,12 @@ TaskAttributionTiming::TaskAttributionTiming(const AtomicString& name, ...@@ -14,16 +14,12 @@ TaskAttributionTiming::TaskAttributionTiming(const AtomicString& name,
const String& container_type, const String& container_type,
const String& container_src, const String& container_src,
const String& container_id, const String& container_id,
const String& container_name, const String& container_name)
double start_time, : PerformanceEntry(name, 0.0, 0.0),
double finish_time,
const String& script_url)
: PerformanceEntry(name, start_time, finish_time),
container_type_(container_type), container_type_(container_type),
container_src_(container_src), container_src_(container_src),
container_id_(container_id), container_id_(container_id),
container_name_(container_name), container_name_(container_name) {}
script_url_(script_url) {}
TaskAttributionTiming::~TaskAttributionTiming() = default; TaskAttributionTiming::~TaskAttributionTiming() = default;
...@@ -35,10 +31,6 @@ PerformanceEntryType TaskAttributionTiming::EntryTypeEnum() const { ...@@ -35,10 +31,6 @@ PerformanceEntryType TaskAttributionTiming::EntryTypeEnum() const {
return PerformanceEntry::EntryType::kTaskAttribution; return PerformanceEntry::EntryType::kTaskAttribution;
} }
String TaskAttributionTiming::scriptURL() const {
return script_url_;
}
String TaskAttributionTiming::containerType() const { String TaskAttributionTiming::containerType() const {
return container_type_; return container_type_;
} }
......
...@@ -16,29 +16,13 @@ class TaskAttributionTiming final : public PerformanceEntry { ...@@ -16,29 +16,13 @@ class TaskAttributionTiming final : public PerformanceEntry {
DEFINE_WRAPPERTYPEINFO(); DEFINE_WRAPPERTYPEINFO();
public: public:
// Used when the LongTaskV2 flag is enabled.
static TaskAttributionTiming* Create(const AtomicString& type,
const String& container_type,
const String& container_src,
const String& container_id,
const String& container_name,
double start_time,
double finish_time,
const String& script_url) {
return MakeGarbageCollected<TaskAttributionTiming>(
type, container_type, container_src, container_id, container_name,
start_time, finish_time, script_url);
}
// Used when the LongTaskV2 flag is disabled.
static TaskAttributionTiming* Create(const AtomicString& type, static TaskAttributionTiming* Create(const AtomicString& type,
const String& container_type, const String& container_type,
const String& container_src, const String& container_src,
const String& container_id, const String& container_id,
const String& container_name) { const String& container_name) {
return MakeGarbageCollected<TaskAttributionTiming>( return MakeGarbageCollected<TaskAttributionTiming>(
type, container_type, container_src, container_id, container_name, 0.0, type, container_type, container_src, container_id, container_name);
0.0, g_empty_string);
} }
AtomicString entryType() const override; AtomicString entryType() const override;
...@@ -48,7 +32,6 @@ class TaskAttributionTiming final : public PerformanceEntry { ...@@ -48,7 +32,6 @@ class TaskAttributionTiming final : public PerformanceEntry {
String containerSrc() const; String containerSrc() const;
String containerId() const; String containerId() const;
String containerName() const; String containerName() const;
String scriptURL() const;
void Trace(blink::Visitor*) override; void Trace(blink::Visitor*) override;
...@@ -56,10 +39,7 @@ class TaskAttributionTiming final : public PerformanceEntry { ...@@ -56,10 +39,7 @@ class TaskAttributionTiming final : public PerformanceEntry {
const String& container_type, const String& container_type,
const String& container_src, const String& container_src,
const String& container_id, const String& container_id,
const String& container_name, const String& container_name);
double start_time,
double finish_time,
const String& script_url);
~TaskAttributionTiming() override; ~TaskAttributionTiming() override;
private: private:
...@@ -69,7 +49,6 @@ class TaskAttributionTiming final : public PerformanceEntry { ...@@ -69,7 +49,6 @@ class TaskAttributionTiming final : public PerformanceEntry {
String container_src_; String container_src_;
String container_id_; String container_id_;
String container_name_; String container_name_;
String script_url_;
}; };
} // namespace blink } // namespace blink
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
// https://w3c.github.io/longtasks/#sec-TaskAttributionTiming // https://w3c.github.io/longtasks/#sec-TaskAttributionTiming
[Exposed=Window] [Exposed=Window]
interface TaskAttributionTiming : PerformanceEntry { interface TaskAttributionTiming : PerformanceEntry {
[RuntimeEnabled=LongTaskV2] readonly attribute DOMString scriptURL;
readonly attribute DOMString containerType; readonly attribute DOMString containerType;
readonly attribute DOMString containerSrc; readonly attribute DOMString containerSrc;
readonly attribute DOMString containerId; readonly attribute DOMString containerId;
......
...@@ -911,9 +911,6 @@ ...@@ -911,9 +911,6 @@
name: "LinkSystemColors", name: "LinkSystemColors",
status: "stable", status: "stable",
}, },
{
name: "LongTaskV2",
},
{ {
name:"ManualSlotting", name:"ManualSlotting",
status:"experimental", status:"experimental",
......
...@@ -2447,10 +2447,6 @@ crbug.com/863896 http/tests/permissions/test-query.html [ Timeout ] ...@@ -2447,10 +2447,6 @@ crbug.com/863896 http/tests/permissions/test-query.html [ Timeout ]
crbug.com/876485 fast/performance/performance-measure-null-exception.html [ Failure ] crbug.com/876485 fast/performance/performance-measure-null-exception.html [ Failure ]
# These tests requires enabling the flag LongTaskV2 in a virtual test suite.
crbug.com/738493 http/tests/performance-timing/longtask-v2/longtask-v8compile.html [ Skip ]
crbug.com/738493 http/tests/performance-timing/longtask-v2/longtask-executescript.html [ Skip ]
crbug.com/713587 external/wpt/css/css-ui/caret-color-006.html [ Skip ] crbug.com/713587 external/wpt/css/css-ui/caret-color-006.html [ Skip ]
# Automatically-added expectations for CSS tests which are temporarily # Automatically-added expectations for CSS tests which are temporarily
......
...@@ -486,11 +486,6 @@ ...@@ -486,11 +486,6 @@
"base": "receiver", "base": "receiver",
"args": ["--force-presentation-receiver-for-testing"] "args": ["--force-presentation-receiver-for-testing"]
}, },
{
"prefix": "longtask-v2",
"base": "http/tests/performance-timing/longtask-v2",
"args": ["--enable-blink-features=LongTaskV2"]
},
{ {
"prefix": "paint-timing", "prefix": "paint-timing",
"base": "external/wpt/paint-timing", "base": "external/wpt/paint-timing",
......
\<!DOCTYPE HTML>
<meta charset=utf-8>
<title>LongTask Timing: validate the long task attributes for execute-script</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<h1>Long Task Attributes for Execute Script</h1>
<div id="log"></div>
<script>
async_test(function (t) {
if (typeof PerformanceLongTaskTiming === 'undefined') {
assert_unreached("Longtasks are not supported.");
t.done();
}
const scriptURL = 'longtask-executescript.html';
const observer = new PerformanceObserver(
t.step_func(function (entryList) {
const longtaskEntries = entryList.getEntries().filter((e) => {
return e.attribution.find((a) => {
return a.scriptURL.includes(scriptURL);
});
});
if (longtaskEntries.length === 0) {
return;
}
assert_equals(longtaskEntries.length, 1);
const longtask = longtaskEntries[0];
assert_equals(longtask.entryType, 'longtask');
assert_equals(longtask.name, 'self');
assert_greater_than(longtask.duration, 50);
assert_greater_than_equal(longtask.startTime, 0);
const currentTime = performance.now();
assert_less_than_equal(longtask.startTime, currentTime);
const runAttribution = longtask.attribution.filter(function(it) {
return it.name === 'script-run' &&
it.scriptURL.includes(scriptURL);
});
assert_equals(runAttribution.length, 1);
const it = runAttribution[0];
assert_greater_than(it.duration, 51);
assert_greater_than(it.startTime, 0);
assert_equals(it.entryType, 'taskattribution');
assert_equals(it.containerType, 'iframe');
assert_equals(it.containerId, '');
assert_equals(it.containerName, '');
assert_equals(it.containerSrc, '');
assert_true(it.scriptURL.includes(scriptURL));
observer.disconnect();
t.done();
})
);
observer.observe({entryTypes: ['longtask']});
/* Generate a slow task. */
const begin = window.performance.now();
while (window.performance.now() < begin + 51);
}, 'Performance longtask entries with execute-script attribute are observable.');
</script>
</body>
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>LongTask Timing: validate the long task attributes for script-compile</title>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<h1>Long Task Attributes for Script-compile</h1>
<div id="log"></div>
<script>
async_test(function (t) {
if (typeof PerformanceLongTaskTiming === 'undefined') {
assert_unreached("Longtasks are not supported.");
t.done();
}
const scriptURL = 'resources/makelongtask.js';
const lineColumn = '(0, 0)';
const observer = new PerformanceObserver(
t.step_func(function(entryList) {
const longtaskEntries = entryList.getEntries().filter((e) => {
return e.attribution.find((a) => {
return a.scriptURL.includes(scriptURL);
});
});
if (longtaskEntries.length === 0) {
return;
}
assert_equals(longtaskEntries.length, 1);
const longtask = longtaskEntries[0];
assert_equals(longtask.entryType, 'longtask');
assert_equals(longtask.name, 'self');
assert_greater_than(longtask.duration, 50);
assert_greater_than_equal(longtask.startTime, 0);
const currentTime = performance.now();
assert_less_than_equal(longtask.startTime, currentTime);
const compileAttribution = longtask.attribution.filter((it) => {
return it.name === 'script-compile' &&
it.scriptURL.includes(scriptURL);
});
assert_equals(compileAttribution.length, 1);
const it = compileAttribution[0];
assert_greater_than(it.startTime, 0);
assert_equals(it.entryType, 'taskattribution');
assert_equals(it.containerType, 'iframe');
assert_equals(it.containerId, '');
assert_equals(it.containerName, '');
assert_equals(it.containerSrc, '');
assert_true(it.scriptURL.includes(scriptURL + lineColumn));
observer.disconnect();
t.done();
})
);
observer.observe({entryTypes: ['longtask']});
internals.BypassLongCompileThresholdOnce();
var iframe=document.createElement('Script');
iframe.src = "resources/makelongtask.js";
document.body.appendChild(iframe);
}, 'Performance longtask entries with script-compile attribute are observable.');
</script>
</body>
\ No newline at end of file
/* Generate a slow task. */
const begin = window.performance.now();
while (window.performance.now() < begin + 51);
\ No newline at end of file
This directory contains the test cases for longtask API v2. For now, the
longtask API V2 are still working in progress and not ready to be web-exposed
yet. Some of them, if appropriate to be web-platform-tests, will be upstreamed
to web-platform-tests after longtask v2 are fully implemented.
The test cases in this directory requires enabling of runtime feature flag
LongTaskV2.
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