add jemalloc to http-ui and the benchmarks

This commit is contained in:
Tamo 2021-06-22 14:17:56 +02:00
parent d53df8a002
commit 77eb37934f
No known key found for this signature in database
GPG key ID: 20CD8020AFA88D69
6 changed files with 20 additions and 0 deletions

View file

@ -8,6 +8,9 @@ publish = false
[dependencies]
milli = { path = "../milli" }
[target.'cfg(target_os = "linux")'.dependencies]
jemallocator = "0.3.2"
[dev-dependencies]
heed = "*" # we want to use the version milli uses
criterion = { version = "0.3.4", features = ["html_reports"] }

View file

@ -5,6 +5,10 @@ use criterion::{criterion_group, criterion_main};
use milli::update::Settings;
use utils::Conf;
#[cfg(target_os = "linux")]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
fn base_conf(builder: &mut Settings) {
let displayed_fields =
["id", "title", "album", "artist", "genre", "country", "released", "duration"]

View file

@ -5,6 +5,10 @@ use criterion::{criterion_group, criterion_main};
use milli::update::Settings;
use utils::Conf;
#[cfg(target_os = "linux")]
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
fn base_conf(builder: &mut Settings) {
let displayed_fields = ["title", "body", "url"].iter().map(|s| s.to_string()).collect();
builder.set_displayed_fields(displayed_fields);