mirror of
https://github.com/facebook/zstd.git
synced 2025-07-30 22:23:13 +03:00
seekable_format: Add test for parallel_compression memory usage
Use ulimit to fail the test if we use O(filesize) memory, rather than O(threads).
This commit is contained in:
committed by
Yann Collet
parent
01c973de8d
commit
13cb7a10ae
1
contrib/seekable_format/tests/.gitignore
vendored
1
contrib/seekable_format/tests/.gitignore
vendored
@ -1 +1,2 @@
|
||||
seekable_tests
|
||||
data.txt
|
||||
|
@ -24,7 +24,7 @@ SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB)
|
||||
.PHONY: default clean test
|
||||
default: test
|
||||
|
||||
test: seekable_tests
|
||||
test: seekable_tests parallel_compression_test
|
||||
./seekable_tests
|
||||
|
||||
$(ZSTDLIB):
|
||||
@ -32,7 +32,27 @@ $(ZSTDLIB):
|
||||
|
||||
seekable_tests : $(SEEKABLE_OBJS)
|
||||
|
||||
EXAMPLES_PATH = ../examples
|
||||
PARALLEL_COMPRESSION = $(EXAMPLES_PATH)/parallel_compression
|
||||
|
||||
DATAGEN_PATH = ../../../tests
|
||||
DATAGEN = $(DATAGEN_PATH)/datagen
|
||||
|
||||
$(PARALLEL_COMPRESSION):
|
||||
$(MAKE) -C $(EXAMPLES_PATH) parallel_compression
|
||||
|
||||
$(DATAGEN):
|
||||
$(MAKE) -C $(DATAGEN_PATH) datagen
|
||||
|
||||
data.txt: $(DATAGEN)
|
||||
$(DATAGEN) -g100M > $@
|
||||
|
||||
parallel_compression_test: $(PARALLEL_COMPRESSION) data.txt
|
||||
ulimit -Sv 102400; $(PARALLEL_COMPRESSION) data.txt 1048576 2
|
||||
|
||||
.PHONY: parallel_compression_test parallel_comp
|
||||
|
||||
clean:
|
||||
@$(RM) core *.o tmp* result* *.zst \
|
||||
seekable_tests
|
||||
seekable_tests data.txt
|
||||
@echo Cleaning completed
|
||||
|
Reference in New Issue
Block a user