quickstep-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zuyu <...@git.apache.org>
Subject [GitHub] incubator-quickstep pull request #22: Add a shell script that logs the build...
Date Mon, 13 Jun 2016 21:16:08 GMT
Github user zuyu commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/22#discussion_r66869747
  
    --- Diff: build/profile_build.sh ---
    @@ -0,0 +1,111 @@
    +#!/bin/bash
    +# This script may be useful for developers to profile the build process itself.
    +#
    +# This shell script runs CMake and make, dumping all output into a log file.
    +# It also logs the CPU usage and memory information during the build.
    +# All log messages are timestamped to enable profiling.
    +#
    +# Dependencies:
    +# - ts
    +# sudo apt-get install -y libtime-duration-perl moreutils
    +# - vmstat and mpstat
    +# sudo apt-get install -y sysstat
    +#
    +# Usage: ./profile_build.sh
    +# Set the CMake and make command you want to use below.
    +# By default, the number of parallel make jobs is equal to the number of
    +# (virtual) CPUs on the machine (nproc).
    +# If CMakeLists.txt is detected, the script exits because in-source-tree build
    +# is not supported.
    +# If CMakeCache.txt is detected, the script skips cmake and runs make only.
    +
    +#   Copyright 2011-2015 Quickstep Technologies LLC.
    +#   Copyright 2015-2016 Pivotal Software, Inc.
    +#   Copyright 2016, Quickstep Research Group, Computer Sciences Department,
    +#     University of Wisconsin—Madison.
    +#
    +#   Licensed under the Apache License, Version 2.0 (the "License");
    +#   you may not use this file except in compliance with the License.
    +#   You may obtain a copy of the License at
    +#
    +#       http://www.apache.org/licenses/LICENSE-2.0
    +#
    +#   Unless required by applicable law or agreed to in writing, software
    +#   distributed under the License is distributed on an "AS IS" BASIS,
    +#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    +#   See the License for the specific language governing permissions and
    +#   limitations under the License.
    +
    +set -e
    +
    +CMAKE_COMMAND="cmake \
    +-D BUILD_SHARED_LIBS=On \
    +-D USE_TCMALLOC=0 \
    +-D CMAKE_BUILD_TYPE=Debug \
    +.. "
    +MAKE_COMMAND="make VERBOSE=1 -j `nproc`"
    --- End diff --
    
    As explained before, users could set `$MAKEFLAGS = -j nproc` to enable concurrent jobs
if needed.
    
    In Mac OS, `tee` exists, but not `nproc`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message