From 895fe3ec5820771dab87b61d4980dcc66e9d94af Mon Sep 17 00:00:00 2001 From: Dave Rigby Date: Tue, 27 Feb 2024 16:09:00 +0000 Subject: [PATCH] pyarrow.jemalloc_set_decay_ms(): Ignore if jemalloc not present jemalloc support is not always present in pyarrow distributions - for example pyarrow-v11 on macOS doesn't have it. As such, don't error if jemalloc_set_decay_ms() raises NotImplementedError. --- locustfile.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/locustfile.py b/locustfile.py index dd93990..9a15d5d 100644 --- a/locustfile.py +++ b/locustfile.py @@ -49,7 +49,11 @@ # associated DataFrame, resulting in excessive process RSS, # particulary with high process counts). import pyarrow -pyarrow.jemalloc_set_decay_ms(0) +try: + pyarrow.jemalloc_set_decay_ms(0) +except NotImplementedError: + # Raised if jemalloc is not supported by the pyarrow installation - skip + pass @events.init_command_line_parser.add_listener