Individual instance response times.
This commit is contained in:
parent
4b6ad35ed6
commit
4b100be9a8
@ -51,13 +51,8 @@ Invidious class >> rawInstances [
|
|||||||
Invidious class >> responseTimes [
|
Invidious class >> responseTimes [
|
||||||
| responses |
|
| responses |
|
||||||
responses := Dictionary new.
|
responses := Dictionary new.
|
||||||
self instancesWithAPIEnabled do: [ :instance | | runTime|
|
self instancesWithAPIEnabled do: [ :instance |
|
||||||
runTime := [ ZnClient new
|
responses at: instance put: instance responseTime.
|
||||||
beOneShot;
|
|
||||||
url: instance uri;
|
|
||||||
get;
|
|
||||||
response ] timeToRun.
|
|
||||||
responses at: instance put: runTime.
|
|
||||||
].
|
].
|
||||||
^ (responses associations asSortedCollection: [ :x :y| x value < y value ])
|
^ (responses associations asSortedCollection: [ :x :y| x value < y value ])
|
||||||
collect: [:assoc | assoc ]
|
collect: [:assoc | assoc ]
|
||||||
@ -116,6 +111,15 @@ Invidious >> region: countryISOCode [
|
|||||||
region := countryISOCode
|
region := countryISOCode
|
||||||
]
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
Invidious >> responseTime [
|
||||||
|
^ [ ZnClient new
|
||||||
|
beOneShot;
|
||||||
|
url: self uri;
|
||||||
|
get;
|
||||||
|
response ] timeToRun
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #accessing }
|
{ #category : #accessing }
|
||||||
Invidious >> uri [
|
Invidious >> uri [
|
||||||
^ uri
|
^ uri
|
||||||
|
Loading…
Reference in New Issue
Block a user