Created
September 4, 2019 22:10
-
-
Save trycf/583341890e0fc11aa032368f9e14af55 to your computer and use it in GitHub Desktop.
TryCF Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
for( i = 1; i<=10; i++){ | |
start = getTickCount(); | |
starWarsPeeps = get("https://swapi.co/api/people/"); | |
starWarsPlanets = get("https://swapi.co/api/planets/"); | |
starWarsStarships = get("https://swapi.co/api/starships/"); | |
dump( (getTickCount()-start)/1000 & " seconds"); | |
} | |
function get(uri){ | |
dump( "calling #uri# at #dateTimeFormat(now())#" ); | |
cfhttp(url=uri, method="GET", result="response"); | |
return deserializeJSON( response.fileContent ); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment