Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit d1dedc6

Browse files
committed
examples: fix csv generation in submodules example.
1 parent 9581ce0 commit d1dedc6

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed
Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
name - bundled - minified
2-
IPFS - 1685.41 - 661.64
3-
add - 968.11 - 344.13
4-
bitswap - 684.80 - 232.13
5-
block - 724.77 - 250.23
6-
bootstrap - 685.64 - 232.39
7-
cat - 725.05 - 250.33
8-
commands - 683.89 - 231.76
9-
config - 686.87 - 233.10
10-
dht - 688.51 - 233.41
11-
diag - 684.97 - 232.18
12-
files - 1120.38 - 404.30
13-
get - 907.74 - 318.35
14-
id - 684.31 - 231.95
15-
key - 684.59 - 232.03
16-
log - 685.40 - 232.38
17-
ls - 684.00 - 231.80
18-
mount - 684.18 - 231.86
19-
name - 684.63 - 232.06
20-
object - 923.66 - 340.57
21-
pin - 685.51 - 232.39
22-
ping - 684.59 - 231.90
23-
pubsub - 740.40 - 249.54
24-
refs - 684.39 - 231.94
25-
repo - 684.56 - 232.02
26-
swarm - 1324.18 - 527.03
27-
update - 684.45 - 231.96
28-
version - 684.21 - 231.88
1+
name - bundled KBs - minified
2+
IPFS, 1685.41, 661.64
3+
add, 968.11, 344.13
4+
bitswap, 684.80, 232.13
5+
block, 724.77, 250.23
6+
bootstrap, 685.64, 232.39
7+
cat, 725.05, 250.33
8+
commands, 683.89, 231.76
9+
config, 686.87, 233.10
10+
dht, 688.51, 233.41
11+
diag, 684.97, 232.18
12+
files, 1120.38, 404.30
13+
get, 907.74, 318.35
14+
id, 684.31, 231.95
15+
key, 684.59, 232.03
16+
log, 685.40, 232.38
17+
ls, 684.00, 231.80
18+
mount, 684.18, 231.86
19+
name, 684.63, 232.06
20+
object, 923.66, 340.57
21+
pin, 685.51, 232.39
22+
ping, 684.59, 231.90
23+
pubsub, 740.40, 249.54
24+
refs, 684.39, 231.94
25+
repo, 684.56, 232.02
26+
swarm, 1324.18, 527.03
27+
update, 684.45, 231.96
28+
version, 684.21, 231.88

examples/sub-module/test-modules-size.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ echo "name - bundled - minified"
88
webpack --display none --config webpack.config.js complete-module.js complete-bundle.js
99
babili complete-bundle.js -o complete-bundle-minified.js
1010

11-
ipfsBundleSize=($(wc -c < complete-bundle.js | awk '{b=$1/1024; printf "%.2f\n", b}'))
12-
ipfsMinSize=($(wc -c < complete-bundle-minified.js | awk '{b=$1/1024; printf "%.2f\n", b}'))
11+
ipfsBundleSize=($(wc -c < complete-bundle.js | awk '{b=$1/1024; printf "%.2f\n", b}' | sed 's/,/./g'))
12+
ipfsMinSize=($(wc -c < complete-bundle-minified.js | awk '{b=$1/1024; printf "%.2f\n", b}' | sed 's/,/./g'))
1313

14-
echo IPFS - $ipfsBundleSize - $ipfsMinSize
14+
echo IPFS, $ipfsBundleSize, $ipfsMinSize
1515

1616
for module in "${modules[@]}"
1717
do
1818
moduledir="modules/$module"
1919
webpack --display none --config webpack.config.js $moduledir/$module.js $moduledir/bundle.js
2020
babili $moduledir/bundle.js -o $moduledir/bundle-minified.js
2121

22-
bundlesize=($(wc -c < $moduledir/bundle.js | awk '{b=$1/1024; printf "%.2f\n", b}'))
23-
minsize=($(wc -c < $moduledir/bundle-minified.js | awk '{b=$1/1024; printf "%.2f\n", b}'))
24-
echo $module - $bundlesize - $minsize
22+
bundlesize=($(wc -c < $moduledir/bundle.js | awk '{b=$1/1024; printf "%.2f\n", b}' | sed 's/,/./g'))
23+
minsize=($(wc -c < $moduledir/bundle-minified.js | awk '{b=$1/1024; printf "%.2f\n", b}' | sed 's/,/./g'))
24+
echo $module, $bundlesize, $minsize
2525
done

0 commit comments

Comments
 (0)