Skip to content

Commit 7b37151

Browse files
Merge branch 'release/5.257.0'
2 parents f2f1579 + 6e6374f commit 7b37151

File tree

364 files changed

+14848
-1778
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

364 files changed

+14848
-1778
lines changed
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Build Benchmark - Nightly
2+
3+
on:
4+
schedule:
5+
# Run nightly at 2 AM UTC
6+
- cron: '0 2 * * *'
7+
workflow_dispatch:
8+
# Allow manual triggering
9+
10+
jobs:
11+
build-benchmark:
12+
name: Run Benchmark
13+
runs-on: android-large-runner
14+
timeout-minutes: 120
15+
16+
steps:
17+
- name: Determine branch
18+
id: determine-branch
19+
run: |
20+
if [ "${{ github.event_name }}" = "push" ] || [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
21+
echo "branch=${{ github.ref_name }}" >> "$GITHUB_OUTPUT"
22+
else
23+
echo "branch=develop" >> "$GITHUB_OUTPUT"
24+
fi
25+
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
with:
29+
ref: ${{ steps.determine-branch.outputs.branch }}
30+
submodules: recursive
31+
32+
- name: Set up Java
33+
uses: actions/setup-java@v4
34+
with:
35+
distribution: 'adopt'
36+
java-version-file: .github/.java-version
37+
38+
- name: Setup Gradle
39+
uses: gradle/actions/setup-gradle@v4
40+
with:
41+
cache-read-only: true
42+
43+
- name: Install SDKMAN
44+
run: |
45+
curl -s "https://get.sdkman.io" | bash
46+
source "$HOME/.sdkman/bin/sdkman-init.sh"
47+
sdk version
48+
49+
- name: Install Gradle Profiler
50+
run: |
51+
source "$HOME/.sdkman/bin/sdkman-init.sh"
52+
sdk install gradleprofiler
53+
gradle-profiler --version
54+
55+
- name: Run Build Benchmarks and Process Results
56+
run: |
57+
source "$HOME/.sdkman/bin/sdkman-init.sh"
58+
python3 build-benchmarks/run-benchmark.py \
59+
--gradle-user-home "$HOME/.gradle" \
60+
--github-action-run-id "${{ github.run_id }}" \
61+
--git-commit-sha "${{ github.sha }}" \
62+
${{ github.event_name == 'schedule' && '--report-pixel' || '' }}
63+
64+
- name: Upload Benchmark Results
65+
uses: actions/upload-artifact@v4
66+
with:
67+
name: build-benchmark-results-${{ github.run_number }}
68+
path: build-benchmarks/results/**/*.csv
69+
retention-days: 30

PixelDefinitions/params_dictionary.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,51 @@
2020
"type": "string",
2121
"description": "ETag for the remote config used when the pixel was sent. Can be empty string.",
2222
"pattern": "^$|^[-0-9a-f]{32}$"
23+
},
24+
"widePixelAppName": {
25+
"key": "app.name",
26+
"type": "string",
27+
"description": "The name of the app sending the pixel",
28+
"enum": ["DuckDuckGo Android"]
29+
},
30+
"widePixelAppVersion": {
31+
"key": "app.version",
32+
"type": "string",
33+
"description": "The version of the app sending the pixel"
34+
},
35+
"widePixelDevMode": {
36+
"key": "app.dev_mode",
37+
"type": "string",
38+
"description": "Whether the app is a development build",
39+
"enum": ["true", "false"]
40+
},
41+
"widePixelPlatform": {
42+
"key": "global.platform",
43+
"type": "string",
44+
"description": "The name of the platform that the app is running on",
45+
"enum": ["Android"]
46+
},
47+
"widePixelType": {
48+
"key": "global.type",
49+
"type": "string",
50+
"description": "The type of software sending the wide pixel",
51+
"enum": ["app"]
52+
},
53+
"widePixelFormFactor": {
54+
"key": "app.form_factor",
55+
"type": "string",
56+
"description": "The form factor of the current device",
57+
"enum": ["phone", "tablet"]
58+
},
59+
"widePixelSampleRate": {
60+
"key": "global.sample_rate",
61+
"type": "number",
62+
"description": "Sample rate for this pixel, between 0 and 1"
63+
},
64+
"widePixelFeatureStatus": {
65+
"key": "feature.status",
66+
"type": "string",
67+
"description": "Final status of the wide event flow",
68+
"enum": ["SUCCESS", "FAILURE", "CANCELLED", "UNKNOWN"]
2369
}
2470
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"m_voice_search_serp_done": {
3+
"description": "User completed a voice search with the Search mode selected.",
4+
"owners": ["joshliebe"],
5+
"triggers": ["other"],
6+
"suffixes": ["form_factor"],
7+
"parameters": ["appVersion"]
8+
},
9+
"m_voice_search_aichat_done": {
10+
"description": "User completed a voice search with the Duck.ai mode selected.",
11+
"owners": ["joshliebe"],
12+
"triggers": ["other"],
13+
"suffixes": ["form_factor"],
14+
"parameters": ["appVersion"]
15+
},
16+
"m_voice_search_cancelled": {
17+
"description": "User canceled a voice search.",
18+
"owners": ["joshliebe"],
19+
"triggers": ["other"],
20+
"suffixes": ["form_factor"],
21+
"parameters": ["appVersion"]
22+
}
23+
}
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
// Wide event pixel for VPN enable flow monitoring
2+
// https://app.asana.com/1/137249556945/project/1205648422731273/task/1211799839160665?focus=true
3+
{
4+
"wide_vpn-enable": {
5+
"description": "User attempts to enable VPN",
6+
"owners": ["lmac012"],
7+
"triggers": ["other"],
8+
"suffixes": ["daily_count_short", "form_factor"],
9+
"parameters": [
10+
"widePixelPlatform",
11+
"widePixelType",
12+
"widePixelSampleRate",
13+
"widePixelFeatureStatus",
14+
"widePixelAppVersion",
15+
"widePixelAppName",
16+
"widePixelFormFactor",
17+
"widePixelDevMode",
18+
{
19+
"key": "context.name",
20+
"description": "Entry point to the VPN enable flow.",
21+
"enum": ["app_settings", "system_tile", "notification"]
22+
},
23+
{
24+
"key": "feature.name",
25+
"description": "Feature identifier for this wide pixel",
26+
"enum": ["vpn-enable"]
27+
},
28+
{
29+
"key": "feature.data.ext.subscription_status",
30+
"description": "User's subscription status at the time of VPN enable attempt",
31+
"enum": ["Auto-Renewable", "Not Auto-Renewable", "Grace Period", "Inactive", "Expired", "Unknown", "Waiting"]
32+
},
33+
{
34+
"key": "feature.data.ext.is_first_setup",
35+
"description": "true if the user is launching the VPN for the first time, false otherwise",
36+
"enum": ["true", "false"]
37+
},
38+
{
39+
"key": "feature.data.ext.cancellation_reason",
40+
"description": "Reason for cancellation. Only present on CANCELLED events.",
41+
"enum": ["vpn_conflict", "permission_denied"]
42+
},
43+
{
44+
"key": "feature.data.ext.failure_reason",
45+
"description": "Error message indicating cause of the failure. Based on VpnStopReason enum, but could be a different static message. Only present on FAILURE events.",
46+
"type": "string"
47+
},
48+
{
49+
"key": "feature.data.ext.service_start_duration_ms_bucketed",
50+
"description": "The duration of TrackerBlockingVpnService (re)start in milliseconds, bucketed (using the upper end of each range)",
51+
"enum": ["1000", "5000", "10000", "30000", "60000", "300000", "600000"]
52+
},
53+
{
54+
"key": "feature.data.ext.step.show_vpn_conflict_dialog",
55+
"description": "Parameter present if the user was asked if they want to disable existing 3rd party VPN",
56+
"enum": ["true"]
57+
},
58+
{
59+
"key": "feature.data.ext.step.ask_for_vpn_permission",
60+
"description": "Parameter present if the user was asked to grant the VPN permission",
61+
"enum": ["true"]
62+
},
63+
{
64+
"key": "feature.data.ext.step.vpn_start_attempt",
65+
"description": "Parameter present if the app attempted to (re)start VPN service. This happens after ensuring app has VPN permissions",
66+
"enum": ["true"]
67+
},
68+
{
69+
"key": "feature.data.ext.step.notify_vpn_start",
70+
"description": "Parameter present if notifyVpnStart() in TrackerBlockingVpnService completed successfully",
71+
"enum": ["true"]
72+
},
73+
{
74+
"key": "feature.data.ext.step.null_tunnel_created",
75+
"description": "Parameter present if null tunnel was successfully created.",
76+
"enum": ["true"]
77+
},
78+
{
79+
"key": "feature.data.ext.step.network_stack_initialized",
80+
"description": "Parameter present if network stack was successfully initialized.",
81+
"enum": ["true"]
82+
}
83+
]
84+
}
85+
}

PixelDefinitions/suffixes_dictionary.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"description": "Pixel schedule type",
88
"enum": ["first", "daily", "count"]
99
},
10+
"daily_count_short": {
11+
"type": "string",
12+
"description": "Pixel schedule type - d=daily, c=count.",
13+
"enum": ["d", "c"]
14+
},
1015
"form_factor": {
1116
"type": "string",
1217
"description": "Platform and device form-factor",

ad-click/ad-click-impl/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ dependencies {
4848
implementation project(path: ':privacy-config-api')
4949
implementation project(path: ':feature-toggles-api')
5050
implementation project(path: ':app-build-config-api')
51+
implementation project(path: ':attributed-metrics-api')
5152

5253
implementation AndroidX.core.ktx
5354

@@ -97,6 +98,7 @@ dependencies {
9798
testImplementation Testing.robolectric
9899

99100
testImplementation project(path: ':common-test')
101+
testImplementation project(path: ':feature-toggles-test')
100102

101103
coreLibraryDesugaring Android.tools.desugarJdkLibs
102104
}

ad-click/ad-click-impl/src/main/java/com/duckduckgo/adclick/impl/DuckDuckGoAdClickManager.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package com.duckduckgo.adclick.impl
1818

1919
import com.duckduckgo.adclick.api.AdClickManager
20+
import com.duckduckgo.adclick.impl.metrics.AdClickCollector
2021
import com.duckduckgo.adclick.impl.pixels.AdClickPixelName
2122
import com.duckduckgo.adclick.impl.pixels.AdClickPixels
2223
import com.duckduckgo.app.browser.UriString
@@ -33,6 +34,7 @@ class DuckDuckGoAdClickManager @Inject constructor(
3334
private val adClickData: AdClickData,
3435
private val adClickAttribution: AdClickAttribution,
3536
private val adClickPixels: AdClickPixels,
37+
private val adClickCollector: AdClickCollector,
3638
) : AdClickManager {
3739

3840
private val publicSuffixDatabase = PublicSuffixDatabase()
@@ -223,6 +225,7 @@ class DuckDuckGoAdClickManager @Inject constructor(
223225
exemptionDeadline = System.currentTimeMillis() + adClickAttribution.getTotalExpirationMillis(),
224226
),
225227
)
228+
adClickCollector.onAdClick()
226229
adClickPixels.fireAdClickDetectedPixel(
227230
savedAdDomain = savedAdDomain,
228231
urlAdDomain = urlAdDomain,

0 commit comments

Comments
 (0)