Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Paulo V C Medeiros
Merge SQLite DBs
Commits
d2c9080e
Commit
d2c9080e
authored
Oct 15, 2020
by
Paulo V C Medeiros
Browse files
Add simple benchmark
parent
8291c911
Changes
2
Hide whitespace changes
Inline
Side-by-side
benchmark.sh
0 → 100755
View file @
d2c9080e
#!/bin/bash
n_files
=
20
input_files_dir
=
'input_files'
# Cleanup
rm
-rf
${
input_files_dir
}
out
*
.db dump.sql
*
.db-journal
# Create input files
mkdir
-p
input_files
for
i
in
$(
seq
$n_files
)
;
do
cp
template_db/template.db
${
input_files_dir
}
/db
${
i
}
.db
done
# Create a list of input files similar to how Ulf is doing
# Useful for reference on how to modify the current scripts
input_files_list
=
`
find
${
input_files_dir
}
-type
f
-name
'*.db'
`
echo
'Testing with "ATTACH DATABASE" strategy'
time
./merge_using_attach.py
${
input_files_list
}
-o
output_with_attach.db
echo
''
echo
'Testing with ".dump" strategy'
time
./merge_using_dump.sh
${
input_files_list
}
rm
-rf
${
input_files_dir
}
dump.sql
*
.db-journal
echo
''
echo
'Done.'
template_db/template.db
0 → 100644
View file @
d2c9080e
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment