* Improve statistics by auto gen enum Ticker & enum Histogram 1. librocksdb-sys/Makefile: Add gen_statistics and gen_statistics.bash, make -C librocksdb-sys gen_statistics will generate 2 files: src/statistics_enum_ticker.rs src/statistics_enum_histogram.rs 2. In statistics.rs, we include! these 2 files and remove old hand writing enum Tickers & enum Histograms. 3. File gen_statistics.bash is used for generating these 2 files which is called in Makefile.
10 lines
376 B
Makefile
10 lines
376 B
Makefile
include rocksdb/src.mk
|
|
|
|
rocksdb_lib_sources.txt: rocksdb/src.mk
|
|
@echo -n "${LIB_SOURCES}" | tr ' ' '\n' > rocksdb_lib_sources.txt
|
|
|
|
gen_lib_sources: rocksdb_lib_sources.txt
|
|
|
|
gen_statistics: rocksdb/monitoring/statistics.cc
|
|
bash gen_statistics.bash $< Ticker > ../src/statistics_enum_ticker.rs
|
|
bash gen_statistics.bash $< Histogram > ../src/statistics_enum_histogram.rs
|