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:
+1
-1
@@ -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,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
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user