Generate functional buckets for a histogram. This is specific to Glean.
-A functional bucketing algorithm. The bucket index of a given sample is
-determined with the following function:
-Generate linear buckets for a histogram.
-Create an empty histogram from an array of buckets.
-Cast a histogram into a JSON blob.
-Interpolate missing histogram buckets with empty buckets.
+required ARRAY<FLOAT64>, `values` ARRAY<FLOAT64>
+input_map ARRAY<STRUCT<key STRING, value FLOAT64>>, buckets ARRAY<STRING>
OUTPUTS
ARRAY<STRUCT<key STRING, value FLOAT64>>
-Source | Edit
+Source | Edit
map_from_array_offsets_precise (UDF)
-Parameters
+Parameters
INPUTS
required ARRAY<FLOAT64>, `values` ARRAY<FLOAT64>
@@ -4117,7 +4103,7 @@ Parameters
Source | Edit
histogram_generate_scalar_buckets (UDF)
Generate scalar buckets for a histogram using a fixed number of buckets.
-Parameters
+Parameters
INPUTS
min_bucket FLOAT64, max_bucket FLOAT64, num_buckets INT64
@@ -4127,7 +4113,7 @@ Parameters
Source | Edit
histogram_generate_exponential_buckets (UDF)
Generate exponential buckets for a histogram.
-Parameters
+Parameters
INPUTS
min FLOAT64, max FLOAT64, nBuckets FLOAT64
@@ -4135,18 +4121,23 @@ Parameters
ARRAY<FLOAT64>DETERMINISTIC
Source | Edit
-fenix_build_to_build_hour (UDF)
-Returns a custom build id generated from the build hour of a Fenix build.
-Parameters
+histogram_generate_functional_buckets (UDF)
+Generate functional buckets for a histogram. This is specific to Glean.
+See: https://github.com/mozilla/glean/blob/main/glean-core/src/histogram/functional.rs
+A functional bucketing algorithm. The bucket index of a given sample is
+determined with the following function:
+i = $$ \lfloor{n log_{\text{base}}{(x)}}\rfloor $$
+In other words, there are n buckets for each power of base
magnitude.
+Parameters
INPUTS
-app_build_id STRING
+log_base INT64, buckets_per_magnitude INT64, range_max INT64
OUTPUTS
-STRING
+ARRAY<FLOAT64>DETERMINISTIC
-Source | Edit
+Source | Edit
histogram_bucket_from_value (UDF)
-Parameters
+Parameters
INPUTS
buckets ARRAY<STRING>, val FLOAT64
@@ -4156,7 +4147,7 @@ Parameters
Source | Edit
build_hour_to_datetime (UDF)
Parses the custom build id used for Fenix builds in GLAM to a datetime.
-Parameters
+Parameters
INPUTS
@@ -4166,7 +4157,7 @@ Parameters
Source | Edit
percentile (UDF)
Get the value of the approximate CDF at the given percentile.
-Parameters
+Parameters
INPUTS
percentile FLOAT64, histogram ARRAY<STRUCT<key STRING, value FLOAT64>>, type STRING
@@ -4176,7 +4167,7 @@ Parameters
Source | Edit
histogram_normalized_sum (UDF)
Compute the normalized sum of an array of histograms.
-Parameters
+Parameters
INPUTS
arrs ARRAY<STRUCT<key STRING, value INT64>>, weight FLOAT64
@@ -4184,16 +4175,15 @@ Parameters
ARRAY<STRUCT<key STRING, value FLOAT64>>
Source | Edit
-histogram_fill_buckets (UDF)
-Interpolate missing histogram buckets with empty buckets.
-Parameters
+map_from_array_offsets (UDF)
+Parameters
INPUTS
-input_map ARRAY<STRUCT<key STRING, value FLOAT64>>, buckets ARRAY<STRING>
+required ARRAY<FLOAT64>, `values` ARRAY<FLOAT64>
OUTPUTS
ARRAY<STRUCT<key STRING, value FLOAT64>>
-Source | Edit
+Source | Edit
histogram_fill_buckets_dirichlet (UDF)
Interpolate missing histogram buckets with empty buckets so it becomes a valid
estimator for the dirichlet distribution.
@@ -4211,7 +4201,7 @@ histogram_fill_buckets_dirichlet (
profiles N reporting
Then our estimate for final density is:
[{k1: ((P1 + 1/K) / (nreporting+1)), k2: ((P2 + 1/K) /(nreporting+1)), ... }
-Parameters
+Parameters
INPUTS
input_map ARRAY<STRUCT<key STRING, value FLOAT64>>, buckets ARRAY<STRING>, total_users INT64
@@ -4221,7 +4211,7 @@ Parameters
Source | Edit
histogram_buckets_cast_string_array (UDF)
Cast histogram buckets into a string array.
-Parameters
+Parameters
INPUTS
@@ -4231,7 +4221,7 @@ Parameters
Source | Edit
build_seconds_to_hour (UDF)
Returns a custom build id generated from the build seconds of a FOG build.
-Parameters
+Parameters
INPUTS
@@ -4239,6 +4229,16 @@ Parameters
Source | Edit
+fenix_build_to_build_hour (UDF)
+Returns a custom build id generated from the build hour of a Fenix build.
+Parameters
+INPUTS
+
+OUTPUTS
+
+Source | Edit
diff --git a/mozfun/glean/index.html b/mozfun/glean/index.html
index c93efb0afd4..f36032dcb4a 100644
--- a/mozfun/glean/index.html
+++ b/mozfun/glean/index.html
@@ -2880,11 +2880,11 @@
-Parameters
+Parameters
INPUTS
@@ -3478,7 +3686,7 @@ Parameters
Source | Edit
normalize (UDF)
Normalize a histogram. Set sum to 1, and normalize to 1 the histogram bucket counts.
-Parameters
+Parameters
INPUTS
histogram STRUCT<bucket_count INT64, `sum` INT64, histogram_type INT64, `range` ARRAY<INT64>, `values` ARRAY<STRUCT<key INT64, value INT64>>>
@@ -3486,54 +3694,6 @@ Parameters
STRUCT<bucket_count INT64, `sum` INT64, histogram_type INT64, `range` ARRAY<INT64>, `values` ARRAY<STRUCT<key INT64, value FLOAT64>>>
Source | Edit
-merge (UDF)
-Merge an array of histograms into a single histogram.
-
-- The histogram values will be summed per-bucket
-- The count will be summed
-- Other fields will take the mode_last
-
-Parameters
-INPUTS
-histogram_list ANY TYPE
-
-Source | Edit
-count (UDF)
-Given histogram h, return the count of all measurements across all buckets.
-Given histogram h, return the count of all measurements across all buckets.
-Extracts the values from the histogram and sums them, returning the total_count.
-Parameters
-INPUTS
-
-OUTPUTS
-
-Source | Edit
-mean (UDF)
-Given histogram h, return floor(mean) of the measurements in the bucket.
-That is, the histogram sum divided by the number of measurements taken.
-https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L292-L307
-Parameters
-INPUTS
-
-OUTPUTS
-STRUCT<sum INT64, VALUES ARRAY<STRUCT<value INT64>>>
-
-Source | Edit
-threshold_count (UDF)
-Return the number of recorded observations greater than threshold for
-the histogram. CAUTION: Does not count any buckets that have any values
-less than the threshold. For example, a bucket with range (1, 10) will
-not be counted for a threshold of 2. Use threshold that are not bucket
-boundaries with caution.
-https://github.com/mozilla/telemetry-batch-view/blob/ea0733c/src/main/scala/com/mozilla/telemetry/utils/MainPing.scala#L213-L239
-Parameters
-INPUTS
-histogram STRING, threshold INT64
-
-Source | Edit
diff --git a/mozfun/iap/index.html b/mozfun/iap/index.html
index ac9ce22e9cb..a0ecc5f0252 100644
--- a/mozfun/iap/index.html
+++ b/mozfun/iap/index.html
@@ -2920,11 +2920,11 @@
-
-
- parse_android_receipt (UDF)
+
+ parse_apple_event (UDF)
-