Error found!!

Got an error that I could find for a while. It was when parsing a lot of
files.

Turn out it was the Thread Pool or something because if I run on 1 core,
it's ok.

Different thing in this commit, I just want to freeze a state that
benchmark work.
This commit is contained in:
2025-01-22 11:34:00 +01:00
parent ebf91bb61c
commit 7c34431702
11 changed files with 164 additions and 111 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
pub const BUFFER_SIZE = 1024 * 10; // Used a bit everywhere. The size for the schema for example. 10kB
pub const MAX_FILE_SIZE = 1024 * 1024; // 1MB
pub const CPU_CORE = 16;
pub const CPU_CORE = 0;
// Debug
pub const PRINT_STATE = false;
+1 -1
View File
@@ -1,6 +1,6 @@
pub const BUFFER_SIZE = 1024 * 1024; // Used a bit everywhere. The size for the schema for example. 10kB
pub const MAX_FILE_SIZE = 1024 * 1024; // 1MB
pub const CPU_CORE = 16;
pub const CPU_CORE = 1;
// Debug
pub const PRINT_STATE = false;
+15 -1
View File
@@ -745,7 +745,7 @@ test "Write and Read" {
try std.fs.cwd().deleteDir("tmp");
}
test "Benchmark Write and Read" {
test "Benchmark Write and Read All" {
const schema = &[_]DType{
.Int,
.Float,
@@ -767,6 +767,20 @@ test "Benchmark Write and Read" {
try benchmark(schema, data);
}
test "Benchmark Write and Read Simple User" {
const schema = &[_]DType{
.Int,
.Str,
};
const data = &[_]Data{
Data.initInt(1),
Data.initStr("Bob"),
};
try benchmark(schema, data);
}
fn benchmark(schema: []const DType, data: []const Data) !void {
const allocator = std.testing.allocator;
const sizes = [_]usize{ 1, 10, 100, 1_000, 10_000, 100_000, 1_000_000 };