Find Origin that passed Core Web Vitals Stat? - chrome-ux-report

The changelog (https://developers.google.com/web/tools/chrome-user-experience-report/bigquery/changelog)reports the origins having good Core Web Vitals, and This info is excellent! Please share if you know the below information related to good Core Web Vitals Stat.
Is changelog reporting for Desktop Or Mobile Or Tablet OR all three?
Was it for the entire Origin Or only for the homepage of Origin?
Where can I see the list of origins that passed Core Web Vitals? If not available & need to find ourself would you mind Giving the query Or Add into Crux CookBook (https://github.com/GoogleChrome/CrUX/tree/master/sql)? I tried to run myself constructing query & run, Got Quote Exceed error sounds due to account limitation.

Also answered in the CrUX discussion forum, but for anyone who found this question on SO first, I'll reshare my response.
Is changelog reporting for Desktop Or Mobile Or Tablet OR all three?
All three combined.
Was it for the entire Origin Or only for the homepage of Origin?
All BigQuery data is aggregated at the origin level, so these compliance rates apply to the entire origin.
Where can I see the list of origins that passed Core Web Vitals? If not available & need to find ourself would you mind Giving the query Or Add into Crux CookBook (https://github.com/GoogleChrome/CrUX/tree/master/sql)? I tried to run myself constructing query & run, Got Quote Exceed error sounds due to account limitation.
https://github.com/GoogleChrome/CrUX/blob/main/sql/core-web-vitals-compliance-rates.sql is a good starting point. Here's a modification of that query to get the list of origins that pass the CWV assessment: (793 MB processed)
CREATE TEMP FUNCTION IS_GOOD (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good / (good + needs_improvement + poor) >= 0.75
);
CREATE TEMP FUNCTION IS_NON_ZERO (good FLOAT64, needs_improvement FLOAT64, poor FLOAT64) RETURNS BOOL AS (
good + needs_improvement + poor > 0
);
SELECT DISTINCT
origin
FROM
`chrome-ux-report.materialized.metrics_summary`
WHERE
date = '2021-03-01' AND
IS_GOOD(fast_lcp, avg_lcp, slow_lcp) AND
IS_GOOD(fast_fid, avg_fid, slow_fid) AND
IS_GOOD(small_cls, medium_cls, large_cls) AND
IS_NON_ZERO(fast_lcp, avg_lcp, slow_lcp) AND
IS_NON_ZERO(fast_fid, avg_fid, slow_fid) AND
IS_NON_ZERO(small_cls, medium_cls, large_cls)

Related

Mozilla Deep Speech SST suddenly can't spell

I am using deep speech for speech to text. Up to 0.8.1, when I ran transcriptions like:
byte_encoding = subprocess.check_output(
"deepspeech --model deepspeech-0.8.1-models.pbmm --scorer deepspeech-0.8.1-models.scorer --audio audio/2830-3980-0043.wav", shell=True)
transcription = byte_encoding.decode("utf-8").rstrip("\n")
I would get back results that were pretty good. But since 0.8.2, where the scorer argument was removed, my results are just rife with misspellings that make me think I am now getting a character level model where I used to get a word-level model. The errors are in a direction that looks like the model isn't correctly specified somehow.
Now I when I call:
byte_encoding = subprocess.check_output(
['deepspeech', '--model', 'deepspeech-0.8.2-models.pbmm', '--audio', myfile])
transcription = byte_encoding.decode("utf-8").rstrip("\n")
I now see errors like
endless -> "endules"
service -> "servic"
legacy -> "legaci"
earning -> "erting"
before -> "befir"
I'm not 100% that it is related to removing the scorer from the API, but it is one thing I see changing between releases, and the documentation suggested accuracy improvements in particular.
Short: The scorer matches letter output from the audio to actual words. You shouldn't leave it out.
Long: If you leave out the scorer argument, you won't be able to detect real world sentences as it matches the output from the acoustic model to words and word combinations present in the textual language model that is part of the scorer. And bear in mind that each scorer has specific lm_alpha and lm_beta values that make the search even more accurate.
The 0.8.2 version should be able to take the scorer argument. Otherwise update to 0.9.0, which has it as well. Maybe your environment is changed in a way. I would start in a new dir and venv.
Assuming you are using Python, you could add this to your code:
ds.enableExternalScorer(args.scorer)
ds.setScorerAlphaBeta(args.lm_alpha, args.lm_beta)
And check the example script.

Alpha Vantage error when symbol has digits

I'm trying to get quotes for an Australian stock with ticker A200.AX (aka A200.AUS) from Alpha Vantage.
I have no issues getting other symbols from the AX market, e.g.:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=ETHI.AUS&apikey=demo
...returns data as expected
However when a symbol has digit(s) in it, it seems to return an error:
https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=A200.AUS&apikey=demo
Invalid API call. Please retry or visit the documentation (https://www.alphavantage.co/documentation/) for TIME_SERIES_INTRADAY.
Same result for F100.AUS
I checked to make sure the ticker was valid: A200.AUS shows up if I search for it:
https://www.alphavantage.co/query?function=SYMBOL_SEARCH&keywords=A200.AUS&apikey=demo
I'm aware of some questions related to URL encoding, but I can't see any URL special characters in A200.AUS . Besides, using the search endpoint works with the ticker passed on literally.
Does anyone know how to download this stock's information or what I'm doing wrong?
Your use of the search endpoint is great, however A200.AUS is an ETF. Alpha Vantage has some ETFs, but currently, only 100% supports stocks.

How is "after" and "before" method implemented in Google Spanner truetime?

According to their pager, it says "The TT.after() and TT.before() methods are convenience wrappers around TT.now()."
And according to What is the TrueTime API in Google's Spanner?
It also provides two functions:
after(t) returns true if t has definitely passed. E.g. t < now().earliest.
before(t) returns true if t has definitely not arrived, or t > now().latest.
My question are:
On all servers in spanner, does TT.now() return the same result?
For a given time t, is possible that on server A before(t) is true and on server B is false?
Are they monotonic? e.g. On server A, TT.after(t) is true, sometime later, is it possible that TT.after(t) is false?
For details of how Truetime and Spanner work, look at section 3 of the Spanner Whitpaper (1).
A discussion of how it could be implemented is in the question "Why is Google's TrueTime API hard to duplicate?" (2)
From the Spanner Whitepaper, a TrueTime value is not a single value but a timestamp range which is guaranteed to contain the absolute value. This range takes into account the potential clock drift - which in Google's network, with syncing the server clocks to the atomic/GPS reference time every 30secs is up to 7ms (from the whitepaper).
So if TTstamp1 is the range (t1_lo, t1_hi) and TTstamp2 is the range (t2_lo, t2_hi), then before() and after() simply compare the extremes of these ranges to confirm that they do not overlap.
TTstamp1.before(TTValue2) = t1_hi < t2_lo
TTstamp1.after(TTValue2) = t1_lo > t2_hi
The answer to your questions are therefore:
No, TT.now() does not return the same result on all servers even if called at the exact same instant. However the values obtained on all servers when called at that instant will overlap each other, meaning that none of them are before nor after each other.
So for a given TrueTime t, it is technically possible that on server A t.before(now) is true and on server B t.before(now) is false due to the overlap comparison and the differences between the possible ranges. This is not an problem for Spanner because it will wait until there is no overlap (t.before(now)==true) before committing a transaction and storing its timestamp.
(Note: this information is derived from the public whitepapers and documentation)
According to the picture below , TT.after(t) is TT.now().earliest > t, so I think it's quite possible that TT.before(t) is TT.now().latest < t.
Try to answer my own question:
TT.now() does not return the same result on all servers at the same time.
Yes, it's possbile. Even though for case of TT.after(),this means time t has definitely passed only on some servers.
I don't know. If it is possbile, then it means t has definitely passed, and then not sure about that, which sounds a little weird
I think "definitely" in their description is a little misleading, they should simply be "higher than the latest" or "lower than the earliest”

How do I Benchmark RESTful Service with Variable Parameters?

I'm currently working on benchmarking a RESTful service I've made, and part of that is making sure it runs in a reasonable amount of times for a large array of parameters. For example, let's say I have RESTful API of the form some_site.com/item?item_id=y. In that case to be sure my service is working as fast as I'd like it to work, I'd want to try out many values for y one by one, preferably coming from some text file. I can't figure out any way of doing this in ab or httperf. I'm open to using a different benchmarking program if I have, but would prefer something simple and light. What I want to do seems like something pretty standard, so I'm guessing there must already be a program that let's me do it, but an hour or so of googling hasn't gotten me an answer. Ideas?
Answer: Jmeter (which is apparently awesome). This faq explains how to do it. Hopefully this helps someone else, as it took me like a day of searching to figure this out.
I have just had some good experience with using JavaScript (via BSF/Rhino) in JMeter.
I have put one thread group in my test plan and stick a 'Simple Controller' with two elements under it - 'HTTP Request' sampler and 'BSF PreProcessor'.
Set BSF language to 'javascript' and either type the code into the text box or point it to a file (use full path or relative to CWD of JMeter process).
/* Since `Math.random()` gives us float, we use `java.util.Random()`
* see: http://docs.oracle.com/javase/7/docs/api/java/util/Random.html */
var Random = new Packages.java.util.Random();
var min = 10-1;
var max = 2;
var maxLines = (min)+Random.nextInt(max-min);
var s = '';
for (var d = 0; d <= maxLines; d++) {
s += d.toString()+','+Random.nextInt(1000).toString()+'\n';
}
// s => '0,312\n1,104\n2,608\n'
vars.put('PAYLOAD', s);
Now I can refer to ${PAYLOAD} in the HTTP request!
You can generate JSON, but you will need to upgrade jakarta-jmeter-2.5.1/lib/js-1.6R5.jar with the newest version of Rhino to get JSON.stringify and JSON.parse. That worked perfectly for me also, though I thought I'd put a simple example here.
You can use BSF pre-processor for URL params as well, just set another variable with vars.put('X', 'some value') and pass it as ${X} in the request parameter.
This blog post helped quite a bit, by the way.

Querying Google Analytics API for statistics for specific pages (filter by pages)

This query gives visits by traffic source;
https: //www.google.com/analytics/feeds/data?ids=ga%3A123456&dimensions=ga%3Asource%2Cga%3Amedium&metrics=ga%3Avisits&sort=-ga%3Avisits&start-date=2009-08-12&end-date=2009-08-26&max-results=50
But, when specifying a filter: ga:pagePath==/Default.aspx - I get zero results
https: //www.google.com/analytics/feeds/data?ids=ga%3A123456&dimensions=ga%3Asource%2Cga%3Amedium&metrics=ga%3Avisits&filters=ga%3ApagePath%3D%3D%2FDefault.aspx&sort=-ga%3Avisits&start-date=2009-08-12&end-date=2009-08-26&max-results=50
How can i filter on ga:pagePath?
query1.Dimensions = "ga:date,ga:pagepath"
query1.Metrics = "ga:pageviews"
query1.Sort = "ga:date,ga:pagepath"
query1.GAStartDate = "2010-09-01"
query1.GAEndDate = "2010-09-10"
query1.Filters = "ga:pagePath=~/abc*"
hope this works for you.
Here's a very late theory to your question...
Your data query looks valid assuming you have content indexed as /Default.aspx. I've reproduced the query on my asp.net site and get back results. I can see two potential scenarios where your query may produce empty results.
The filter mechanism in Analytics is case sensitive so if by chance links come into the page as default.aspx your filter for 'Default.aspx' won't hit. I wouldn't have guessed it works this way but lately I've had to go back and fix some of our queries as they produced empty results when case mismatches occurred.
The second possible issue relates to the use of 'Default Documents'. If links are coming into your site without a file name ('/' or '/somepath/') and 'default.aspx' is setup as a 'Default Document' in IIS, then you really want the filter to be ga:pagePath==/.