Various optimizations, Readme update, Bench script for imports
This commit is contained in:
28
examples/import_bench.jl
Normal file
28
examples/import_bench.jl
Normal file
@@ -0,0 +1,28 @@
|
||||
using metagraph_optimization
|
||||
using BenchmarkTools
|
||||
using Base
|
||||
using Base.Filesystem
|
||||
|
||||
function bench_txt(filepath::String)
|
||||
name = basename(filepath)
|
||||
name, _ = splitext(name)
|
||||
|
||||
println(name, ":")
|
||||
g = import_txt(filepath)
|
||||
print(g)
|
||||
println(" Graph size in memory: ", bytes_to_human_readable(Base.summarysize(g)))
|
||||
@btime import_txt($filepath)
|
||||
println()
|
||||
end
|
||||
|
||||
function main()
|
||||
bench_txt("examples/AB->AB.txt")
|
||||
bench_txt("examples/AB->ABBB.txt")
|
||||
bench_txt("examples/AB->ABBBBB.txt")
|
||||
bench_txt("examples/AB->ABBBBBBB.txt")
|
||||
#bench_txt("examples/AB->ABBBBBBBBB.txt")
|
||||
bench_txt("examples/ABAB->ABAB.txt")
|
||||
bench_txt("examples/ABAB->ABC.txt")
|
||||
end
|
||||
|
||||
main()
|
Reference in New Issue
Block a user