Add tests for clients_histogram_bucket_counts and clients_histogram_probe_counts.

This commit is contained in:
Marina Samuel 2020-04-01 12:54:55 -04:00
Родитель 45e882099d
Коммит 991d41841c
7 изменённых файлов: 346 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,107 @@
[
{
"mode": "REQUIRED",
"name": "submission_date",
"type": "DATE"
},
{
"mode": "REQUIRED",
"name": "sample_id",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "client_id",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "os",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "app_version",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "app_build_id",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "channel",
"type": "STRING"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "first_bucket",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "last_bucket",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "num_buckets",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "latest_version",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "metric",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "metric_type",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "process",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "agg_type",
"type": "STRING"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "INTEGER"
}
],
"mode": "REPEATED",
"name": "aggregates",
"type": "RECORD"
}
],
"mode": "REPEATED",
"name": "histogram_aggregates",
"type": "RECORD"
}
]

Просмотреть файл

@ -0,0 +1,71 @@
---
- &base
submission_date: '2020-03-25'
sample_id: 0
client_id: test
os: first
app_version: 75
app_build_id: first
channel: nightly
histogram_aggregates:
{
"first_bucket": 1,
"last_bucket": 1000,
"num_buckets": 100,
"latest_version": 75,
"metric": "some_metric",
"metric_type": "histogram-exponential",
"key": "",
"process": "parent",
"agg_type": "summed_histogram",
"aggregates": [
{
"key": '0',
"value": 44
},
{
"key": '10',
"value": 324
},
{
"key": '20',
"value": 22
},
{
"key": '30',
"value": 9
}
]
}
- <<: *base
app_build_id: second
histogram_aggregates:
{
"first_bucket": 1,
"last_bucket": 1000,
"num_buckets": 100,
"latest_version": 75,
"metric": "some_metric",
"metric_type": "histogram-exponential",
"key": "",
"process": "parent",
"agg_type": "summed_histogram",
"aggregates": [
{
"key": '0',
"value": 44
},
{
"key": '10',
"value": 324
},
{
"key": '20',
"value": 22
},
{
"key": '30',
"value": 9
}
]
}

Просмотреть файл

@ -0,0 +1,8 @@
{"agg_type":"summed_histogram","app_build_id":"first","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"0","value":0.11027568922305764}}
{"agg_type":"summed_histogram","app_build_id":"first","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"10","value":0.8120300751879699}}
{"agg_type":"summed_histogram","app_build_id":"first","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"20","value":0.05513784461152882}}
{"agg_type":"summed_histogram","app_build_id":"first","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"30","value":0.022556390977443608}}
{"agg_type":"summed_histogram","app_build_id":"second","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"0","value":0.11027568922305764}}
{"agg_type":"summed_histogram","app_build_id":"second","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"10","value":0.8120300751879699}}
{"agg_type":"summed_histogram","app_build_id":"second","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"20","value":0.05513784461152882}}
{"agg_type":"summed_histogram","app_build_id":"second","app_version":75,"channel":"nightly","first_bucket":1,"key":"","last_bucket":1000,"metric":"some_metric","metric_type":"histogram-exponential","num_buckets":100,"os":"first","process":"parent","record":{"key":"30","value":0.022556390977443608}}

Просмотреть файл

@ -0,0 +1,3 @@
- name: submission_date
type: DATE
value: 2020-03-25

Просмотреть файл

@ -0,0 +1,79 @@
[
{
"mode": "NULLABLE",
"name": "os",
"type": "STRING"
},
{
"mode": "REQUIRED",
"name": "app_version",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "app_build_id",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "channel",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "first_bucket",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "last_bucket",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "num_buckets",
"type": "INTEGER"
},
{
"mode": "NULLABLE",
"name": "metric",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "metric_type",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "process",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "agg_type",
"type": "STRING"
},
{
"fields": [
{
"mode": "NULLABLE",
"name": "key",
"type": "STRING"
},
{
"mode": "NULLABLE",
"name": "value",
"type": "FLOAT64"
}
],
"mode": "NULLABLE",
"name": "record",
"type": "RECORD"
}
]

Просмотреть файл

@ -0,0 +1,72 @@
---
- &base
os: first
app_version: 75
channel: nightly
first_bucket: 1
last_bucket: 100
num_buckets: 10
metric: test
metric_type: histogram-exponential
key: ''
process: parent
agg_type: summed_histogram
app_build_id: first
record: {
"key": '0',
"value": 0.2,
}
- <<: *base
app_build_id: first
record: {
"key": '2',
"value": 0.1,
}
- <<: *base
app_build_id: first
record: {
"key": '5',
"value": 0.2,
}
- <<: *base
app_build_id: first
record: {
"key": '9',
"value": 0.3,
}
- <<: *base
app_build_id: first
record: {
"key": '54',
"value": 0.2,
}
- <<: *base
app_build_id: second
record: {
"key": '0',
"value": 0.2,
}
- <<: *base
app_build_id: second
record: {
"key": '2',
"value": 0.1,
}
- <<: *base
app_build_id: second
record: {
"key": '5',
"value": 0.2,
}
- <<: *base
app_build_id: second
record: {
"key": '9',
"value": 0.3,
}
- <<: *base
app_build_id: second
record: {
"key": '54',
"value": 0.2,
}

Просмотреть файл

@ -0,0 +1,6 @@
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.2},{"key":"1","value":0},{"key":"2","value":0.1},{"key":"3","value":0},{"key":"5","value":0.2},{"key":"9","value":0.3},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.2},{"key":"100","value":0}],"app_build_id":"first","app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","os":"first","process":"parent","total_users":1}
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.2},{"key":"1","value":0},{"key":"2","value":0.1},{"key":"3","value":0},{"key":"5","value":0.2},{"key":"9","value":0.3},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.2},{"key":"100","value":0}],"app_build_id":"first","app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","process":"parent","total_users":1}
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.2},{"key":"1","value":0},{"key":"2","value":0.1},{"key":"3","value":0},{"key":"5","value":0.2},{"key":"9","value":0.3},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.2},{"key":"100","value":0}],"app_build_id":"second","app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","os":"first","process":"parent","total_users":1}
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.2},{"key":"1","value":0},{"key":"2","value":0.1},{"key":"3","value":0},{"key":"5","value":0.2},{"key":"9","value":0.3},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.2},{"key":"100","value":0}],"app_build_id":"second","app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","process":"parent","total_users":1}
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.4},{"key":"1","value":0},{"key":"2","value":0.2},{"key":"3","value":0},{"key":"5","value":0.4},{"key":"9","value":0.6},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.4},{"key":"100","value":0}],"app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","os":"first","process":"parent","total_users":2}
{"agg_type":"histogram","aggregates":[{"key":"0","value":0.4},{"key":"1","value":0},{"key":"2","value":0.2},{"key":"3","value":0},{"key":"5","value":0.4},{"key":"9","value":0.6},{"key":"16","value":0},{"key":"29","value":0},{"key":"54","value":0.4},{"key":"100","value":0}],"app_version":75,"channel":"nightly","client_agg_type":"summed_histogram","key":"","metric":"test","metric_type":"histogram-exponential","process":"parent","total_users":2}