@@ -14,34 +14,34 @@ const AssetCache = saveLocal.AssetCache;
14
14
// don’t await here to test concurrency
15
15
let first = saveLocal ( "https://www.zachleat.com/img/avatar-2017-big.png" , options ) ;
16
16
promises . push ( first ) ;
17
-
18
- let second = saveLocal ( "https://www.zachleat.com/img/avatar-2017-big.png" , options ) ;
19
- promises . push ( second ) ;
20
-
21
- promises . push ( saveLocal ( "https://www.zachleat.com/web/css/fonts/lato/2.0/LatoLatin-Regular.ttf" , options ) ) ;
22
-
23
- let json = saveLocal ( "https://opencollective.com/11ty/members/all.json" , {
24
- duration : options . duration ,
25
- type : "json"
26
- } ) ;
27
- promises . push ( json ) ;
28
-
29
- let asset = new AssetCache ( "twitter-followers-eleven_ty" ) ;
30
- if ( asset . isCacheValid ( "4d" ) ) {
31
- console . log ( "Found cached value" ) ;
32
- console . log ( await asset . getCachedValue ( ) ) ;
33
- } else {
34
- console . log ( "Saving value" ) ;
35
- asset . save ( { followers : 42 } , "json" ) ;
36
- }
37
-
17
+
18
+ // let second = saveLocal("https://www.zachleat.com/img/avatar-2017-big.png", options);
19
+ // promises.push(second);
20
+
21
+ // promises.push(saveLocal("https://www.zachleat.com/web/css/fonts/lato/2.0/LatoLatin-Regular.ttf", options));
22
+
23
+ // let json = saveLocal("https://opencollective.com/11ty/members/all.json", {
24
+ // duration: options.duration,
25
+ // type: "json"
26
+ // });
27
+ // promises.push(json);
28
+
29
+ // let asset = new AssetCache("twitter-followers-eleven_ty");
30
+ // if(asset.isCacheValid("4d")) {
31
+ // console.log( "Found cached value" );
32
+ // console.log( await asset.getCachedValue() );
33
+ // } else {
34
+ // console.log( "Saving value" );
35
+ // asset.save({ followers: 42 }, "json");
36
+ // }
37
+
38
38
await Promise . all ( promises ) ;
39
-
40
- console . log ( JSON . stringify ( await json ) . substr ( 0 , 100 ) , "… (truncated)" ) ;
41
-
39
+
40
+ // console.log( JSON.stringify(await json).substr(0, 100), "… (truncated)" );
41
+
42
42
console . log ( process . cpuUsage ( startCpu ) ) ;
43
43
console . log ( os . freemem ( ) / ( 1024 * 1024 ) , os . totalmem ( ) / ( 1024 * 1024 ) ) ;
44
44
// console.log( process.memoryUsage() );
45
45
// console.log( process.resourceUsage() );
46
-
46
+
47
47
} ) ( ) ;
0 commit comments