File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,15 @@ jobs:
30
30
- name : Collect benchmark data
31
31
run : |
32
32
mkdir -p benchmark_data
33
- find /tmp/affine/AFFiNE-0.23.2 -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -type f | \
33
+ find /tmp/affine/AFFiNE-0.23.2 -type f \( - name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) | \
34
34
while IFS= read -r file; do
35
- echo "// File: $file" >> benchmark_data/all_files.js
36
- cat "$file" >> benchmark_data/all_files.js
37
- echo -e "\n\n" >> benchmark_data/all_files.js
35
+ if [ -f "$file" ] && [ -r "$file" ]; then
36
+ echo "// File: $file" >> benchmark_data/all_files.js
37
+ cat "$file" >> benchmark_data/all_files.js 2>/dev/null || echo "// Failed to read $file" >> benchmark_data/all_files.js
38
+ echo -e "\n\n" >> benchmark_data/all_files.js
39
+ fi
38
40
done
39
- find /tmp/affine/AFFiNE-0.23.2 -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" -type f > benchmark_data/file_list.txt
41
+ find /tmp/affine/AFFiNE-0.23.2 -type f \( - name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) > benchmark_data/file_list.txt
40
42
echo "Collected $(wc -l < benchmark_data/file_list.txt) files ($(wc -c < benchmark_data/all_files.js) bytes)"
41
43
- name : Build benchmark binary
42
44
run : cargo build --release --bin affine_bench
You can’t perform that action at this time.
0 commit comments