| 1 | /* |
| 2 | * Copyright (C) 2012-2018 Apple Inc. All rights reserved. |
| 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' |
| 14 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, |
| 15 | * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS |
| 17 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
| 18 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
| 19 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
| 20 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN |
| 21 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 22 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF |
| 23 | * THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #include "config.h" |
| 27 | #include "DiagnosticLoggingKeys.h" |
| 28 | |
| 29 | namespace WebCore { |
| 30 | |
| 31 | String DiagnosticLoggingKeys::mediaLoadedKey() |
| 32 | { |
| 33 | return "mediaLoaded"_s ; |
| 34 | } |
| 35 | |
| 36 | String DiagnosticLoggingKeys::mediaLoadingFailedKey() |
| 37 | { |
| 38 | return "mediaFailedLoading"_s ; |
| 39 | } |
| 40 | |
| 41 | String DiagnosticLoggingKeys::memoryCacheEntryDecisionKey() |
| 42 | { |
| 43 | return "memoryCacheEntryDecision"_s ; |
| 44 | } |
| 45 | |
| 46 | String DiagnosticLoggingKeys::memoryCacheUsageKey() |
| 47 | { |
| 48 | return "memoryCacheUsage"_s ; |
| 49 | } |
| 50 | |
| 51 | String DiagnosticLoggingKeys::missingValidatorFieldsKey() |
| 52 | { |
| 53 | return "missingValidatorFields"_s ; |
| 54 | } |
| 55 | |
| 56 | String DiagnosticLoggingKeys::pluginLoadedKey() |
| 57 | { |
| 58 | return "pluginLoaded"_s ; |
| 59 | } |
| 60 | |
| 61 | String DiagnosticLoggingKeys::pluginLoadingFailedKey() |
| 62 | { |
| 63 | return "pluginFailedLoading"_s ; |
| 64 | } |
| 65 | |
| 66 | String DiagnosticLoggingKeys::postPageBackgroundingCPUUsageKey() |
| 67 | { |
| 68 | return "postPageBackgroundingCPUUsage"_s ; |
| 69 | } |
| 70 | |
| 71 | String DiagnosticLoggingKeys::postPageBackgroundingMemoryUsageKey() |
| 72 | { |
| 73 | return "postPageBackgroundingMemoryUsage"_s ; |
| 74 | } |
| 75 | |
| 76 | String DiagnosticLoggingKeys::pageHandlesWebGLContextLossKey() |
| 77 | { |
| 78 | return "pageHandlesWebGLContextLoss"_s ; |
| 79 | } |
| 80 | |
| 81 | String DiagnosticLoggingKeys::postPageLoadCPUUsageKey() |
| 82 | { |
| 83 | return "postPageLoadCPUUsage"_s ; |
| 84 | } |
| 85 | |
| 86 | String DiagnosticLoggingKeys::postPageLoadMemoryUsageKey() |
| 87 | { |
| 88 | return "postPageLoadMemoryUsage"_s ; |
| 89 | } |
| 90 | |
| 91 | String DiagnosticLoggingKeys::provisionalLoadKey() |
| 92 | { |
| 93 | return "provisionalLoad"_s ; |
| 94 | } |
| 95 | |
| 96 | String DiagnosticLoggingKeys::pageContainsPluginKey() |
| 97 | { |
| 98 | return "pageContainsPlugin"_s ; |
| 99 | } |
| 100 | |
| 101 | String DiagnosticLoggingKeys::pageContainsAtLeastOnePluginKey() |
| 102 | { |
| 103 | return "pageContainsAtLeastOnePlugin"_s ; |
| 104 | } |
| 105 | |
| 106 | String DiagnosticLoggingKeys::pageContainsMediaEngineKey() |
| 107 | { |
| 108 | return "pageContainsMediaEngine"_s ; |
| 109 | } |
| 110 | |
| 111 | String DiagnosticLoggingKeys::pageContainsAtLeastOneMediaEngineKey() |
| 112 | { |
| 113 | return "pageContainsAtLeastOneMediaEngine"_s ; |
| 114 | } |
| 115 | |
| 116 | String DiagnosticLoggingKeys::pageLoadedKey() |
| 117 | { |
| 118 | return "pageLoaded"_s ; |
| 119 | } |
| 120 | |
| 121 | String DiagnosticLoggingKeys::playedKey() |
| 122 | { |
| 123 | return "played"_s ; |
| 124 | } |
| 125 | |
| 126 | String DiagnosticLoggingKeys::engineFailedToLoadKey() |
| 127 | { |
| 128 | return "engineFailedToLoad"_s ; |
| 129 | } |
| 130 | |
| 131 | String DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey() |
| 132 | { |
| 133 | return "entryRightlyNotWarmedUp"_s ; |
| 134 | } |
| 135 | |
| 136 | String DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey() |
| 137 | { |
| 138 | return "entryWronglyNotWarmedUp"_s ; |
| 139 | } |
| 140 | |
| 141 | String DiagnosticLoggingKeys::navigationKey() |
| 142 | { |
| 143 | return "navigation"_s ; |
| 144 | } |
| 145 | |
| 146 | String DiagnosticLoggingKeys::needsRevalidationKey() |
| 147 | { |
| 148 | return "needsRevalidation"_s ; |
| 149 | } |
| 150 | |
| 151 | String DiagnosticLoggingKeys::networkCacheKey() |
| 152 | { |
| 153 | return "networkCache"_s ; |
| 154 | } |
| 155 | |
| 156 | String DiagnosticLoggingKeys::networkCacheFailureReasonKey() |
| 157 | { |
| 158 | return "networkCacheFailureReason"_s ; |
| 159 | } |
| 160 | |
| 161 | String DiagnosticLoggingKeys::networkCacheUnusedReasonKey() |
| 162 | { |
| 163 | return "networkCacheUnusedReason"_s ; |
| 164 | } |
| 165 | |
| 166 | String DiagnosticLoggingKeys::networkCacheReuseFailureKey() |
| 167 | { |
| 168 | return "networkCacheReuseFailure"_s ; |
| 169 | } |
| 170 | |
| 171 | String DiagnosticLoggingKeys::networkKey() |
| 172 | { |
| 173 | return "network"_s ; |
| 174 | } |
| 175 | |
| 176 | String DiagnosticLoggingKeys::networkProcessCrashedKey() |
| 177 | { |
| 178 | return "networkProcessCrashed"_s ; |
| 179 | } |
| 180 | |
| 181 | String DiagnosticLoggingKeys::neverSeenBeforeKey() |
| 182 | { |
| 183 | return "neverSeenBefore"_s ; |
| 184 | } |
| 185 | |
| 186 | String DiagnosticLoggingKeys::noKey() |
| 187 | { |
| 188 | return "no"_s ; |
| 189 | } |
| 190 | |
| 191 | String DiagnosticLoggingKeys::noCacheKey() |
| 192 | { |
| 193 | return "noCache"_s ; |
| 194 | } |
| 195 | |
| 196 | String DiagnosticLoggingKeys::noStoreKey() |
| 197 | { |
| 198 | return "noStore"_s ; |
| 199 | } |
| 200 | |
| 201 | String DiagnosticLoggingKeys::nonVisibleStateKey() |
| 202 | { |
| 203 | return "nonVisibleState"_s ; |
| 204 | } |
| 205 | |
| 206 | String DiagnosticLoggingKeys::notInMemoryCacheKey() |
| 207 | { |
| 208 | return "notInMemoryCache"_s ; |
| 209 | } |
| 210 | |
| 211 | String DiagnosticLoggingKeys::pageCacheKey() |
| 212 | { |
| 213 | return "pageCache"_s ; |
| 214 | } |
| 215 | |
| 216 | String DiagnosticLoggingKeys::pageCacheFailureKey() |
| 217 | { |
| 218 | return "pageCacheFailure"_s ; |
| 219 | } |
| 220 | |
| 221 | String DiagnosticLoggingKeys::noDocumentLoaderKey() |
| 222 | { |
| 223 | return "noDocumentLoader"_s ; |
| 224 | } |
| 225 | |
| 226 | String DiagnosticLoggingKeys::noLongerInCacheKey() |
| 227 | { |
| 228 | return "noLongerInCache"_s ; |
| 229 | } |
| 230 | |
| 231 | String DiagnosticLoggingKeys::otherKey() |
| 232 | { |
| 233 | return "other"_s ; |
| 234 | } |
| 235 | |
| 236 | String DiagnosticLoggingKeys::mainDocumentErrorKey() |
| 237 | { |
| 238 | return "mainDocumentError"_s ; |
| 239 | } |
| 240 | |
| 241 | String DiagnosticLoggingKeys::mainResourceKey() |
| 242 | { |
| 243 | return "mainResource"_s ; |
| 244 | } |
| 245 | |
| 246 | String DiagnosticLoggingKeys::isErrorPageKey() |
| 247 | { |
| 248 | return "isErrorPage"_s ; |
| 249 | } |
| 250 | |
| 251 | String DiagnosticLoggingKeys::isExpiredKey() |
| 252 | { |
| 253 | return "isExpired"_s ; |
| 254 | } |
| 255 | |
| 256 | String DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey() |
| 257 | { |
| 258 | return "isReloadIgnoringCacheData"_s ; |
| 259 | } |
| 260 | |
| 261 | String DiagnosticLoggingKeys::loadingKey() |
| 262 | { |
| 263 | return "loading"_s ; |
| 264 | } |
| 265 | |
| 266 | String DiagnosticLoggingKeys::hasPluginsKey() |
| 267 | { |
| 268 | return "hasPlugins"_s ; |
| 269 | } |
| 270 | |
| 271 | String DiagnosticLoggingKeys::httpsNoStoreKey() |
| 272 | { |
| 273 | return "httpsNoStore"_s ; |
| 274 | } |
| 275 | |
| 276 | String DiagnosticLoggingKeys::imageKey() |
| 277 | { |
| 278 | return "image"_s ; |
| 279 | } |
| 280 | |
| 281 | String DiagnosticLoggingKeys::inMemoryCacheKey() |
| 282 | { |
| 283 | return "inMemoryCache"_s ; |
| 284 | } |
| 285 | |
| 286 | String DiagnosticLoggingKeys::inactiveKey() |
| 287 | { |
| 288 | return "inactive"_s ; |
| 289 | } |
| 290 | |
| 291 | String DiagnosticLoggingKeys::internalErrorKey() |
| 292 | { |
| 293 | return "internalError"_s ; |
| 294 | } |
| 295 | |
| 296 | String DiagnosticLoggingKeys::invalidSessionIDKey() |
| 297 | { |
| 298 | return "invalidSessionID"_s ; |
| 299 | } |
| 300 | |
| 301 | String DiagnosticLoggingKeys::isAttachmentKey() |
| 302 | { |
| 303 | return "isAttachment"_s ; |
| 304 | } |
| 305 | |
| 306 | String DiagnosticLoggingKeys::isConditionalRequestKey() |
| 307 | { |
| 308 | return "isConditionalRequest"_s ; |
| 309 | } |
| 310 | |
| 311 | String DiagnosticLoggingKeys::isDisabledKey() |
| 312 | { |
| 313 | return "isDisabled"_s ; |
| 314 | } |
| 315 | |
| 316 | String DiagnosticLoggingKeys::noCurrentHistoryItemKey() |
| 317 | { |
| 318 | return "noCurrentHistoryItem"_s ; |
| 319 | } |
| 320 | |
| 321 | String DiagnosticLoggingKeys::quirkRedirectComingKey() |
| 322 | { |
| 323 | return "quirkRedirectComing"_s ; |
| 324 | } |
| 325 | |
| 326 | String DiagnosticLoggingKeys::rawKey() |
| 327 | { |
| 328 | return "raw"_s ; |
| 329 | } |
| 330 | |
| 331 | String DiagnosticLoggingKeys::redirectKey() |
| 332 | { |
| 333 | return "redirect"_s ; |
| 334 | } |
| 335 | |
| 336 | String DiagnosticLoggingKeys::isLoadingKey() |
| 337 | { |
| 338 | return "isLoading"_s ; |
| 339 | } |
| 340 | |
| 341 | String DiagnosticLoggingKeys::documentLoaderStoppingKey() |
| 342 | { |
| 343 | return "documentLoaderStopping"_s ; |
| 344 | } |
| 345 | |
| 346 | String DiagnosticLoggingKeys::domainCausingCrashKey() |
| 347 | { |
| 348 | return "DomainCausingCrash"_s ; |
| 349 | } |
| 350 | |
| 351 | String DiagnosticLoggingKeys::domainCausingEnergyDrainKey() |
| 352 | { |
| 353 | return "DomainCausingEnergyDrain"_s ; |
| 354 | } |
| 355 | |
| 356 | String DiagnosticLoggingKeys::domainCausingJetsamKey() |
| 357 | { |
| 358 | return "DomainCausingJetsam"_s ; |
| 359 | } |
| 360 | |
| 361 | String DiagnosticLoggingKeys::simulatedPageCrashKey() |
| 362 | { |
| 363 | return "SimulatedPageCrash"_s ; |
| 364 | } |
| 365 | |
| 366 | String DiagnosticLoggingKeys::exceededActiveMemoryLimitKey() |
| 367 | { |
| 368 | return "ExceededActiveMemoryLimit"_s ; |
| 369 | } |
| 370 | |
| 371 | String DiagnosticLoggingKeys::exceededInactiveMemoryLimitKey() |
| 372 | { |
| 373 | return "ExceededInactiveMemoryLimit"_s ; |
| 374 | } |
| 375 | |
| 376 | String DiagnosticLoggingKeys::exceededBackgroundCPULimitKey() |
| 377 | { |
| 378 | return "ExceededBackgroundCPULimit"_s ; |
| 379 | } |
| 380 | |
| 381 | String DiagnosticLoggingKeys::domainVisitedKey() |
| 382 | { |
| 383 | return "DomainVisited"_s ; |
| 384 | } |
| 385 | |
| 386 | String DiagnosticLoggingKeys::cannotSuspendActiveDOMObjectsKey() |
| 387 | { |
| 388 | return "cannotSuspendActiveDOMObjects"_s ; |
| 389 | } |
| 390 | |
| 391 | String DiagnosticLoggingKeys::cpuUsageKey() |
| 392 | { |
| 393 | return "cpuUsage"_s ; |
| 394 | } |
| 395 | |
| 396 | String DiagnosticLoggingKeys::createSharedBufferFailedKey() |
| 397 | { |
| 398 | return "createSharedBufferFailed"_s ; |
| 399 | } |
| 400 | |
| 401 | String DiagnosticLoggingKeys::activeInForegroundTabKey() |
| 402 | { |
| 403 | return "activeInForegroundTab"_s ; |
| 404 | } |
| 405 | |
| 406 | String DiagnosticLoggingKeys::activeInBackgroundTabOnlyKey() |
| 407 | { |
| 408 | return "activeInBackgroundTabOnly"_s ; |
| 409 | } |
| 410 | |
| 411 | String DiagnosticLoggingKeys::applicationCacheKey() |
| 412 | { |
| 413 | return "applicationCache"_s ; |
| 414 | } |
| 415 | |
| 416 | #if ENABLE(APPLICATION_MANIFEST) |
| 417 | String DiagnosticLoggingKeys::applicationManifestKey() |
| 418 | { |
| 419 | return "applicationManifest"_s ; |
| 420 | } |
| 421 | #endif |
| 422 | |
| 423 | String DiagnosticLoggingKeys::audioKey() |
| 424 | { |
| 425 | return "audio"_s ; |
| 426 | } |
| 427 | |
| 428 | String DiagnosticLoggingKeys::backNavigationDeltaKey() |
| 429 | { |
| 430 | return "backNavigationDelta"_s ; |
| 431 | } |
| 432 | |
| 433 | String DiagnosticLoggingKeys::canCacheKey() |
| 434 | { |
| 435 | return "canCache"_s ; |
| 436 | } |
| 437 | |
| 438 | String DiagnosticLoggingKeys::cacheControlNoStoreKey() |
| 439 | { |
| 440 | return "cacheControlNoStore"_s ; |
| 441 | } |
| 442 | |
| 443 | String DiagnosticLoggingKeys::cachedResourceRevalidationKey() |
| 444 | { |
| 445 | return "cachedResourceRevalidation"_s ; |
| 446 | } |
| 447 | |
| 448 | String DiagnosticLoggingKeys::cachedResourceRevalidationReasonKey() |
| 449 | { |
| 450 | return "cachedResourceRevalidationReason"_s ; |
| 451 | } |
| 452 | |
| 453 | String DiagnosticLoggingKeys::deniedByClientKey() |
| 454 | { |
| 455 | return "deniedByClient"_s ; |
| 456 | } |
| 457 | |
| 458 | String DiagnosticLoggingKeys::deviceMotionKey() |
| 459 | { |
| 460 | return "deviceMotion"_s ; |
| 461 | } |
| 462 | |
| 463 | String DiagnosticLoggingKeys::deviceOrientationKey() |
| 464 | { |
| 465 | return "deviceOrientation"_s ; |
| 466 | } |
| 467 | |
| 468 | String DiagnosticLoggingKeys::diskCacheKey() |
| 469 | { |
| 470 | return "diskCache"_s ; |
| 471 | } |
| 472 | |
| 473 | String DiagnosticLoggingKeys::diskCacheAfterValidationKey() |
| 474 | { |
| 475 | return "diskCacheAfterValidation"_s ; |
| 476 | } |
| 477 | |
| 478 | String DiagnosticLoggingKeys::reloadKey() |
| 479 | { |
| 480 | return "reload"_s ; |
| 481 | } |
| 482 | |
| 483 | String DiagnosticLoggingKeys::replaceKey() |
| 484 | { |
| 485 | return "replace"_s ; |
| 486 | } |
| 487 | |
| 488 | String DiagnosticLoggingKeys::retrievalRequestKey() |
| 489 | { |
| 490 | return "retrievalRequest"_s ; |
| 491 | } |
| 492 | |
| 493 | String DiagnosticLoggingKeys::resourceLoadedKey() |
| 494 | { |
| 495 | return "resourceLoaded"_s ; |
| 496 | } |
| 497 | |
| 498 | String DiagnosticLoggingKeys::resourceResponseSourceKey() |
| 499 | { |
| 500 | return "resourceResponseSource"_s ; |
| 501 | } |
| 502 | |
| 503 | String DiagnosticLoggingKeys::retrievalKey() |
| 504 | { |
| 505 | return "retrieval"_s ; |
| 506 | } |
| 507 | |
| 508 | String DiagnosticLoggingKeys::revalidatingKey() |
| 509 | { |
| 510 | return "revalidating"_s ; |
| 511 | } |
| 512 | |
| 513 | String DiagnosticLoggingKeys::reloadFromOriginKey() |
| 514 | { |
| 515 | return "reloadFromOrigin"_s ; |
| 516 | } |
| 517 | |
| 518 | String DiagnosticLoggingKeys::reloadRevalidatingExpiredKey() |
| 519 | { |
| 520 | return "reloadRevalidatingExpired"_s ; |
| 521 | } |
| 522 | |
| 523 | String DiagnosticLoggingKeys::sameLoadKey() |
| 524 | { |
| 525 | return "sameLoad"_s ; |
| 526 | } |
| 527 | |
| 528 | String DiagnosticLoggingKeys::scriptKey() |
| 529 | { |
| 530 | return "script"_s ; |
| 531 | } |
| 532 | |
| 533 | String DiagnosticLoggingKeys::serviceWorkerKey() |
| 534 | { |
| 535 | return "serviceWorker"_s ; |
| 536 | } |
| 537 | |
| 538 | String DiagnosticLoggingKeys::streamingMedia() |
| 539 | { |
| 540 | return "streamingMedia"_s ; |
| 541 | } |
| 542 | |
| 543 | String DiagnosticLoggingKeys::styleSheetKey() |
| 544 | { |
| 545 | return "styleSheet"_s ; |
| 546 | } |
| 547 | |
| 548 | String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey() |
| 549 | { |
| 550 | return "successfulSpeculativeWarmupWithRevalidation"_s ; |
| 551 | } |
| 552 | |
| 553 | String DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey() |
| 554 | { |
| 555 | return "successfulSpeculativeWarmupWithoutRevalidation"_s ; |
| 556 | } |
| 557 | |
| 558 | String DiagnosticLoggingKeys::svgDocumentKey() |
| 559 | { |
| 560 | return "svgDocument"_s ; |
| 561 | } |
| 562 | |
| 563 | String DiagnosticLoggingKeys::synchronousMessageFailedKey() |
| 564 | { |
| 565 | return "synchronousMessageFailed"_s ; |
| 566 | } |
| 567 | |
| 568 | String DiagnosticLoggingKeys::telemetryPageLoadKey() |
| 569 | { |
| 570 | return "telemetryPageLoad"_s ; |
| 571 | } |
| 572 | |
| 573 | String DiagnosticLoggingKeys::timedOutKey() |
| 574 | { |
| 575 | return "timedOut"_s ; |
| 576 | } |
| 577 | |
| 578 | String DiagnosticLoggingKeys::canceledLessThan2SecondsKey() |
| 579 | { |
| 580 | return "canceledLessThan2Seconds"_s ; |
| 581 | } |
| 582 | |
| 583 | String DiagnosticLoggingKeys::canceledLessThan5SecondsKey() |
| 584 | { |
| 585 | return "canceledLessThan5Seconds"_s ; |
| 586 | } |
| 587 | |
| 588 | String DiagnosticLoggingKeys::canceledLessThan20SecondsKey() |
| 589 | { |
| 590 | return "canceledLessThan20Seconds"_s ; |
| 591 | } |
| 592 | |
| 593 | String DiagnosticLoggingKeys::canceledMoreThan20SecondsKey() |
| 594 | { |
| 595 | return "canceledMoreThan20Seconds"_s ; |
| 596 | } |
| 597 | |
| 598 | String DiagnosticLoggingKeys::failedLessThan2SecondsKey() |
| 599 | { |
| 600 | return "failedLessThan2Seconds"_s ; |
| 601 | } |
| 602 | |
| 603 | String DiagnosticLoggingKeys::failedLessThan5SecondsKey() |
| 604 | { |
| 605 | return "failedLessThan5Seconds"_s ; |
| 606 | } |
| 607 | |
| 608 | String DiagnosticLoggingKeys::failedLessThan20SecondsKey() |
| 609 | { |
| 610 | return "failedLessThan20Seconds"_s ; |
| 611 | } |
| 612 | |
| 613 | String DiagnosticLoggingKeys::failedMoreThan20SecondsKey() |
| 614 | { |
| 615 | return "failedMoreThan20Seconds"_s ; |
| 616 | } |
| 617 | |
| 618 | String DiagnosticLoggingKeys::occurredKey() |
| 619 | { |
| 620 | return "occurred"_s ; |
| 621 | } |
| 622 | |
| 623 | String DiagnosticLoggingKeys::succeededLessThan2SecondsKey() |
| 624 | { |
| 625 | return "succeededLessThan2Seconds"_s ; |
| 626 | } |
| 627 | |
| 628 | String DiagnosticLoggingKeys::succeededLessThan5SecondsKey() |
| 629 | { |
| 630 | return "succeededLessThan5Seconds"_s ; |
| 631 | } |
| 632 | |
| 633 | String DiagnosticLoggingKeys::succeededLessThan20SecondsKey() |
| 634 | { |
| 635 | return "succeededLessThan20Seconds"_s ; |
| 636 | } |
| 637 | |
| 638 | String DiagnosticLoggingKeys::succeededMoreThan20SecondsKey() |
| 639 | { |
| 640 | return "succeededMoreThan20Seconds"_s ; |
| 641 | } |
| 642 | |
| 643 | String DiagnosticLoggingKeys::uncacheableStatusCodeKey() |
| 644 | { |
| 645 | return "uncacheableStatusCode"_s ; |
| 646 | } |
| 647 | |
| 648 | String DiagnosticLoggingKeys::underMemoryPressureKey() |
| 649 | { |
| 650 | return "underMemoryPressure"_s ; |
| 651 | } |
| 652 | |
| 653 | String DiagnosticLoggingKeys::unknownEntryRequestKey() |
| 654 | { |
| 655 | return "unknownEntryRequest"_s ; |
| 656 | } |
| 657 | |
| 658 | String DiagnosticLoggingKeys::unlikelyToReuseKey() |
| 659 | { |
| 660 | return "unlikelyToReuse"_s ; |
| 661 | } |
| 662 | |
| 663 | String DiagnosticLoggingKeys::unsupportedHTTPMethodKey() |
| 664 | { |
| 665 | return "unsupportedHTTPMethod"_s ; |
| 666 | } |
| 667 | |
| 668 | String DiagnosticLoggingKeys::unsuspendableDOMObjectKey() |
| 669 | { |
| 670 | return "unsuspendableDOMObject"_s ; |
| 671 | } |
| 672 | |
| 673 | String DiagnosticLoggingKeys::unusedKey() |
| 674 | { |
| 675 | return "unused"_s ; |
| 676 | } |
| 677 | |
| 678 | String DiagnosticLoggingKeys::unusedReasonCredentialSettingsKey() |
| 679 | { |
| 680 | return "unused.reason.credentialSettings"_s ; |
| 681 | } |
| 682 | |
| 683 | String DiagnosticLoggingKeys::unusedReasonErrorKey() |
| 684 | { |
| 685 | return "unused.reason.error"_s ; |
| 686 | } |
| 687 | |
| 688 | String DiagnosticLoggingKeys::unusedReasonMustRevalidateNoValidatorKey() |
| 689 | { |
| 690 | return "unused.reason.mustRevalidateNoValidator"_s ; |
| 691 | } |
| 692 | |
| 693 | String DiagnosticLoggingKeys::unusedReasonNoStoreKey() |
| 694 | { |
| 695 | return "unused.reason.noStore"_s ; |
| 696 | } |
| 697 | |
| 698 | String DiagnosticLoggingKeys::unusedReasonRedirectChainKey() |
| 699 | { |
| 700 | return "unused.reason.redirectChain"_s ; |
| 701 | } |
| 702 | |
| 703 | String DiagnosticLoggingKeys::unusedReasonReloadKey() |
| 704 | { |
| 705 | return "unused.reason.reload"_s ; |
| 706 | } |
| 707 | |
| 708 | String DiagnosticLoggingKeys::unusedReasonTypeMismatchKey() |
| 709 | { |
| 710 | return "unused.reason.typeMismatch"_s ; |
| 711 | } |
| 712 | |
| 713 | String DiagnosticLoggingKeys::usedKey() |
| 714 | { |
| 715 | return "used"_s ; |
| 716 | } |
| 717 | |
| 718 | String DiagnosticLoggingKeys::userZoomActionKey() |
| 719 | { |
| 720 | return "userZoomAction"_s ; |
| 721 | } |
| 722 | |
| 723 | String DiagnosticLoggingKeys::() |
| 724 | { |
| 725 | return "varyingHeaderMismatch"_s ; |
| 726 | } |
| 727 | |
| 728 | String DiagnosticLoggingKeys::videoKey() |
| 729 | { |
| 730 | return "video"_s ; |
| 731 | } |
| 732 | |
| 733 | String DiagnosticLoggingKeys::visibleNonActiveStateKey() |
| 734 | { |
| 735 | return "visibleNonActiveState"_s ; |
| 736 | } |
| 737 | |
| 738 | String DiagnosticLoggingKeys::visibleAndActiveStateKey() |
| 739 | { |
| 740 | return "visibleAndActiveState"_s ; |
| 741 | } |
| 742 | |
| 743 | String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey() |
| 744 | { |
| 745 | return "wastedSpeculativeWarmupWithRevalidation"_s ; |
| 746 | } |
| 747 | |
| 748 | String DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey() |
| 749 | { |
| 750 | return "wastedSpeculativeWarmupWithoutRevalidation"_s ; |
| 751 | } |
| 752 | |
| 753 | String DiagnosticLoggingKeys::webViewKey() |
| 754 | { |
| 755 | return "webView"_s ; |
| 756 | } |
| 757 | |
| 758 | String DiagnosticLoggingKeys::yesKey() |
| 759 | { |
| 760 | return "yes"_s ; |
| 761 | } |
| 762 | |
| 763 | String DiagnosticLoggingKeys::expiredKey() |
| 764 | { |
| 765 | return "expired"_s ; |
| 766 | } |
| 767 | |
| 768 | String DiagnosticLoggingKeys::fontKey() |
| 769 | { |
| 770 | return "font"_s ; |
| 771 | } |
| 772 | |
| 773 | String DiagnosticLoggingKeys::prunedDueToMemoryPressureKey() |
| 774 | { |
| 775 | return "pruned.memoryPressure"_s ; |
| 776 | } |
| 777 | |
| 778 | String DiagnosticLoggingKeys::prunedDueToMaxSizeReached() |
| 779 | { |
| 780 | return "pruned.capacityReached"_s ; |
| 781 | } |
| 782 | |
| 783 | String DiagnosticLoggingKeys::prunedDueToProcessSuspended() |
| 784 | { |
| 785 | return "pruned.processSuspended"_s ; |
| 786 | } |
| 787 | |
| 788 | String WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey() |
| 789 | { |
| 790 | return "notHTTPFamily"_s ; |
| 791 | } |
| 792 | |
| 793 | String WebCore::DiagnosticLoggingKeys::webGLStateKey() |
| 794 | { |
| 795 | return "webGLState"_s ; |
| 796 | } |
| 797 | |
| 798 | String DiagnosticLoggingKeys::memoryUsageToDiagnosticLoggingKey(uint64_t memoryUsage) |
| 799 | { |
| 800 | if (memoryUsage < 32 * MB) |
| 801 | return "below32"_s ; |
| 802 | if (memoryUsage < 64 * MB) |
| 803 | return "32to64"_s ; |
| 804 | if (memoryUsage < 128 * MB) |
| 805 | return "64to128"_s ; |
| 806 | if (memoryUsage < 256 * MB) |
| 807 | return "128to256"_s ; |
| 808 | if (memoryUsage < 512 * MB) |
| 809 | return "256to512"_s ; |
| 810 | if (memoryUsage < 1024 * MB) |
| 811 | return "512to1024"_s ; |
| 812 | if (memoryUsage < 2048 * MB) |
| 813 | return "1024to2048"_s ; |
| 814 | if (memoryUsage < 4096llu * MB) |
| 815 | return "2048to4096"_s ; |
| 816 | if (memoryUsage < 8192llu * MB) |
| 817 | return "4096to8192"_s ; |
| 818 | if (memoryUsage < 16384llu * MB) |
| 819 | return "8192to16384"_s ; |
| 820 | if (memoryUsage < 32768llu * MB) |
| 821 | return "16384to32768"_s ; |
| 822 | return "over32768"_s ; |
| 823 | } |
| 824 | |
| 825 | String DiagnosticLoggingKeys::foregroundCPUUsageToDiagnosticLoggingKey(double cpuUsage) |
| 826 | { |
| 827 | if (cpuUsage < 10) |
| 828 | return "below10"_s ; |
| 829 | if (cpuUsage < 20) |
| 830 | return "10to20"_s ; |
| 831 | if (cpuUsage < 40) |
| 832 | return "20to40"_s ; |
| 833 | if (cpuUsage < 60) |
| 834 | return "40to60"_s ; |
| 835 | if (cpuUsage < 80) |
| 836 | return "60to80"_s ; |
| 837 | return "over80"_s ; |
| 838 | } |
| 839 | |
| 840 | String DiagnosticLoggingKeys::backgroundCPUUsageToDiagnosticLoggingKey(double cpuUsage) |
| 841 | { |
| 842 | if (cpuUsage < 1) |
| 843 | return "below1"_s ; |
| 844 | if (cpuUsage < 5) |
| 845 | return "1to5"_s ; |
| 846 | if (cpuUsage < 10) |
| 847 | return "5to10"_s ; |
| 848 | if (cpuUsage < 30) |
| 849 | return "10to30"_s ; |
| 850 | if (cpuUsage < 50) |
| 851 | return "30to50"_s ; |
| 852 | if (cpuUsage < 70) |
| 853 | return "50to70"_s ; |
| 854 | return "over70"_s ; |
| 855 | } |
| 856 | |
| 857 | String DiagnosticLoggingKeys::resourceLoadStatisticsTelemetryKey() |
| 858 | { |
| 859 | return "resourceLoadStatisticsTelemetry"_s ; |
| 860 | } |
| 861 | |
| 862 | } // namespace WebCore |
| 863 | |
| 864 | |