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

Side by Side Diff: third_party/WebKit/Source/core/timing/PerformanceTiming.cpp

Issue 2238543002: Instrument parser blocking script execution time. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 399
400 unsigned long long PerformanceTiming::parseBlockedOnScriptLoadFromDocumentWriteD uration() const 400 unsigned long long PerformanceTiming::parseBlockedOnScriptLoadFromDocumentWriteD uration() const
401 { 401 {
402 const DocumentParserTiming* timing = documentParserTiming(); 402 const DocumentParserTiming* timing = documentParserTiming();
403 if (!timing) 403 if (!timing)
404 return 0; 404 return 0;
405 405
406 return toIntegerMilliseconds(timing->parserBlockedOnScriptLoadFromDocumentWr iteDuration()); 406 return toIntegerMilliseconds(timing->parserBlockedOnScriptLoadFromDocumentWr iteDuration());
407 } 407 }
408 408
409 unsigned long long PerformanceTiming::parseBlockedOnScriptExecutionDuration() co nst
410 {
411 const DocumentParserTiming* timing = documentParserTiming();
412 if (!timing)
413 return 0;
414
415 return toIntegerMilliseconds(timing->parserBlockedOnScriptExecutionDuration( ));
416 }
417
418 unsigned long long PerformanceTiming::parseBlockedOnScriptExecutionFromDocumentW riteDuration() const
419 {
420 const DocumentParserTiming* timing = documentParserTiming();
421 if (!timing)
422 return 0;
423
424 return toIntegerMilliseconds(timing->parserBlockedOnScriptExecutionFromDocum entWriteDuration());
425 }
426
409 DocumentLoader* PerformanceTiming::documentLoader() const 427 DocumentLoader* PerformanceTiming::documentLoader() const
410 { 428 {
411 if (!m_frame) 429 if (!m_frame)
412 return nullptr; 430 return nullptr;
413 431
414 return m_frame->loader().documentLoader(); 432 return m_frame->loader().documentLoader();
415 } 433 }
416 434
417 const DocumentTiming* PerformanceTiming::documentTiming() const 435 const DocumentTiming* PerformanceTiming::documentTiming() const
418 { 436 {
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
513 531
514 return timing->pseudoWallTimeToMonotonicTime(toDoubleSeconds(integerMillisec onds)); 532 return timing->pseudoWallTimeToMonotonicTime(toDoubleSeconds(integerMillisec onds));
515 } 533 }
516 534
517 DEFINE_TRACE(PerformanceTiming) 535 DEFINE_TRACE(PerformanceTiming)
518 { 536 {
519 DOMWindowProperty::trace(visitor); 537 DOMWindowProperty::trace(visitor);
520 } 538 }
521 539
522 } // namespace blink 540 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/timing/PerformanceTiming.h ('k') | third_party/WebKit/Source/web/WebPerformance.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698