-
Notifications
You must be signed in to change notification settings - Fork 0
/
create-csv.sh
37 lines (30 loc) · 1.06 KB
/
create-csv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/usr/bin/env sh
#
# JBZoo Toolbox - Csv-Blueprint.
#
# This file is part of the JBZoo Toolbox project.
# For the full copyright and license information, please view the LICENSE
# file that was distributed with this source code.
#
# @license MIT
# @copyright Copyright (C) JBZoo.com, All rights reserved.
# @see https://github.com/JBZoo/Csv-Blueprint
#
echo "----"
php ./tests/Benchmarks/bench.php --columns=$BENCH_COLS --rows=0 --add-header --ansi -vv
php ./tests/Benchmarks/bench.php --columns=$BENCH_COLS --rows=$BENCH_ROWS_SRC --ansi -vv
echo "----"
echo "Source file size : $(du -h ./build/bench/${BENCH_COLS}_${BENCH_ROWS_SRC}.csv)"
echo "Source rows count: $(wc -l ./build/bench/${BENCH_COLS}_${BENCH_ROWS_SRC}.csv)"
cat ./build/bench/${BENCH_COLS}_header.csv > $BENCH_CSV_PATH
for i in {1..1000}; do
cat ./build/bench/${BENCH_COLS}_${BENCH_ROWS_SRC}.csv >> $BENCH_CSV_PATH
done
echo "----"
echo $BENCH_CSV_PATH
head $BENCH_CSV_PATH
echo "----"
echo "File size : $(du -h $BENCH_CSV_PATH)"
echo "Rows count: $(wc -l $BENCH_CSV_PATH)"
echo "----"
echo "Done!"