Skip to content

Commit

Permalink
rename get_physical_cores to get_cpu_cores
Browse files Browse the repository at this point in the history
less wrong
  • Loading branch information
jb55 committed Dec 1, 2023
1 parent d5242aa commit a2dea7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#error "Unsupported platform"
#endif

static inline int get_physical_cores() {
static inline int get_cpu_cores() {
int num_cores = 0;

// Windows
Expand Down
2 changes: 1 addition & 1 deletion nostrdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -4398,7 +4398,7 @@ inline int ndb_builder_push_tag_str(struct ndb_builder *builder,
//
void ndb_default_config(struct ndb_config *config)
{
int cores = get_physical_cores();
int cores = get_cpu_cores();
config->mapsize = 1024UL * 1024UL * 1024UL * 32UL; // 32 GiB
config->ingester_threads = cores == -1 ? 4 : cores;
config->flags = 0;
Expand Down

0 comments on commit a2dea7c

Please sign in to comment.