This commit is contained in:
parent
99d469de9c
commit
8cc0640d6b
1 changed files with 6 additions and 7 deletions
|
@ -33,7 +33,7 @@ pub fn main() -> Nil {
|
||||||
|> list.filter(string.ends_with(_, ".kicad_sym"))
|
|> list.filter(string.ends_with(_, ".kicad_sym"))
|
||||||
// |> list.drop(0)
|
// |> list.drop(0)
|
||||||
// |> list.take(20)
|
// |> list.take(20)
|
||||||
// |> list.sample(1000)
|
// |> list.sample(20)
|
||||||
// let symbol_libraries = ["test_files/test3.kicad_mod"]
|
// let symbol_libraries = ["test_files/test3.kicad_mod"]
|
||||||
test_read_parse_decode(symbol_libraries, token.symbol_library, True)
|
test_read_parse_decode(symbol_libraries, token.symbol_library, True)
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ fn test_read_parse_decode(
|
||||||
let num_file_names = list.length(file_names)
|
let num_file_names = list.length(file_names)
|
||||||
let num_file_names_str = int.to_string(num_file_names)
|
let num_file_names_str = int.to_string(num_file_names)
|
||||||
let num_len = string.length(num_file_names_str)
|
let num_len = string.length(num_file_names_str)
|
||||||
io.println("Total: " <> num_file_names_str)
|
io.println("Total Files: " <> num_file_names_str)
|
||||||
|
|
||||||
let time_before_read = timestamp.system_time()
|
let time_before_read = timestamp.system_time()
|
||||||
let #(successfully_read, failed_to_read) =
|
let #(successfully_read, failed_to_read) =
|
||||||
|
@ -98,7 +98,7 @@ fn test_read_parse_decode(
|
||||||
let time_after_read = timestamp.system_time()
|
let time_after_read = timestamp.system_time()
|
||||||
let num_successfully_read = list.length(successfully_read)
|
let num_successfully_read = list.length(successfully_read)
|
||||||
print_stats(
|
print_stats(
|
||||||
"Read: ",
|
"Files Read: ",
|
||||||
num_successfully_read,
|
num_successfully_read,
|
||||||
num_file_names,
|
num_file_names,
|
||||||
num_len,
|
num_len,
|
||||||
|
@ -128,7 +128,7 @@ fn test_read_parse_decode(
|
||||||
let time_after_parse = timestamp.system_time()
|
let time_after_parse = timestamp.system_time()
|
||||||
let num_successfully_parsed = list.length(successfully_parsed)
|
let num_successfully_parsed = list.length(successfully_parsed)
|
||||||
print_stats(
|
print_stats(
|
||||||
"Parsed: ",
|
"Files Parsed: ",
|
||||||
num_successfully_parsed,
|
num_successfully_parsed,
|
||||||
num_successfully_read,
|
num_successfully_read,
|
||||||
num_len,
|
num_len,
|
||||||
|
@ -158,7 +158,7 @@ fn test_read_parse_decode(
|
||||||
let time_after_decode = timestamp.system_time()
|
let time_after_decode = timestamp.system_time()
|
||||||
let num_successfully_decoded = list.length(successfully_decoded)
|
let num_successfully_decoded = list.length(successfully_decoded)
|
||||||
print_stats(
|
print_stats(
|
||||||
"Decoded: ",
|
"Files Decoded: ",
|
||||||
num_successfully_decoded,
|
num_successfully_decoded,
|
||||||
num_successfully_parsed,
|
num_successfully_parsed,
|
||||||
num_len,
|
num_len,
|
||||||
|
@ -176,7 +176,6 @@ fn test_read_parse_decode(
|
||||||
}
|
}
|
||||||
|
|
||||||
io.println(
|
io.println(
|
||||||
"Total Time Taken: "
|
"Total Time: " <> time_taken_string(time_before_read, time_after_decode),
|
||||||
<> time_taken_string(time_before_read, time_after_decode),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue