Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"make benchmark" is not available #309

Open
jserv opened this issue Sep 12, 2021 · 5 comments
Open

"make benchmark" is not available #309

jserv opened this issue Sep 12, 2021 · 5 comments

Comments

@jserv
Copy link
Contributor

jserv commented Sep 12, 2021

Quote from top-level documentation:

Benchmark
~/lwan/build$ make benchmark
This will compile testrunner and execute benchmark script src/scripts/benchmark.py.

However, after configuring cmake, I found no target named benchmark.

@jserv
Copy link
Contributor Author

jserv commented Sep 12, 2021

I checked the executable file specified in LWAN_PATH of script src/scripts/benchmark.py. It was not built with make testrunner. Instead, the appropriate path would be build/src/bin/testrunner/testrunner.

@jserv
Copy link
Contributor Author

jserv commented Sep 12, 2021

Related: #270

@JackyYin
Copy link
Contributor

Hello,
I think it's because you're missing lua or python3 package.

Check the following code block in CMakeList.txt:

#
# Set up testsuite and benchmark targets
#
find_package(PythonInterp 3)
if (LUA_FOUND AND PYTHONINTERP_FOUND)
	add_custom_target(testsuite
		COMMAND ${PYTHON_EXECUTABLE}
			${PROJECT_SOURCE_DIR}/src/scripts/testsuite.py -v ${CMAKE_BINARY_DIR}
		DEPENDS testrunner techempower
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
		COMMENT "Running test suite.")

	add_custom_target(benchmark
		COMMAND ${PYTHON_EXECUTABLE}
			${PROJECT_SOURCE_DIR}/src/scripts/benchmark.py
			${CMAKE_BINARY_DIR}/src/bin/testrunner/testrunner
		DEPENDS testrunner
		WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
		COMMENT "Running benchmark.")
endif()

After I successfully installed lua and python3, I am able to see benchmark and testsuite in my Makefile.

this is my Dockerfile config:

FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y && \
  apt-get install -y \
  git cmake zlib1g-dev pkg-config lua5.1-dev libsqlite3-dev libmysqlclient-dev  python3 \
  gcc g++ make valgrind gdb

@jserv
Copy link
Contributor Author

jserv commented Sep 12, 2021

Thank @JackyYin for prompt reply. I would send a pull request on explicit prerequisites for target testsuite and benchmark later.

@JackyYin
Copy link
Contributor

Thanks @jserv ,
I have made a related PR: #311 for fixing benchmark.py and CMakeList.txt, but I didn't modify the README.md, you can make another PR for documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants