Skip to content

Commit

Permalink
Adding 4 pixels to track the content blocking rules lookup/fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
studiosutara committed Nov 27, 2024
1 parent 47083ed commit 5da6d8c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions Core/ContentBlocking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,14 @@ public final class ContentBlocking {
case .contentBlockingLookupRulesSucceeded:

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Unit Tests

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'

Check failure on line 122 in Core/ContentBlocking.swift

View workflow job for this annotation

GitHub Actions / Make Release Build

type 'ContentBlockerDebugEvents' has no member 'contentBlockingLookupRulesSucceeded'
domainEvent = .contentBlockingLookupRulesSucceeded

case .contentBlockingFetchRulesSucceeded:
domainEvent = .contentBlockingFetchRulesSucceeded
case .contentBlockingFetchLRCSucceeded:
domainEvent = .contentBlockingFetchLRCSucceeded

case .contentBlockingLookupAndFetchFailed:
domainEvent = .contentBlockingLookupAndFetchFailed
case .contentBlockingNoMatchInLRC:
domainEvent = .contentBlockingNoMatchInLRC

case .contentBlockingLRCMissing:
domainEvent = .contentBlockingLRCMissing
}

if let error = error {
Expand Down
11 changes: 7 additions & 4 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,9 @@ extension Pixel {

case contentBlockingCompilationTime
case contentBlockingLookupRulesSucceeded
case contentBlockingFetchRulesSucceeded
case contentBlockingLookupAndFetchFailed
case contentBlockingFetchLRCSucceeded
case contentBlockingNoMatchInLRC
case contentBlockingLRCMissing

case ampBlockingRulesCompilationFailed

Expand Down Expand Up @@ -1366,8 +1367,10 @@ extension Pixel.Event {
case .contentBlockingCompilationTime: return "m_content_blocking_compilation_time"

case .contentBlockingLookupRulesSucceeded: return "m_content_blocking_lookup_rules_succeeded"
case .contentBlockingFetchRulesSucceeded: return "m_content_blocking_fetch_rules_succeeded"
case .contentBlockingLookupAndFetchFailed: return "m_content_blocking_lookup_and_fetch_failed"
case .contentBlockingFetchLRCSucceeded: return "m_content_blocking_fetch_lrc_succeeded"
case .contentBlockingNoMatchInLRC: return "m_content_blocking_no_match_in_lrc"
case .contentBlockingLRCMissing: return "m_content_blocking_lrc_missing"

case .ampBlockingRulesCompilationFailed: return "m_debug_amp_rules_compilation_failed"

case .webKitDidTerminate: return "m_d_wkt"
Expand Down

0 comments on commit 5da6d8c

Please sign in to comment.