Github user navsan commented on a diff in the pull request:

    https://github.com/apache/incubator-quickstep/pull/22#discussion_r66728162
  
    --- 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 --
    
    Then just change it in the script. This is not meant to be a stand-alone 
tool with lots of configuration options. Just a helper/utility script to not 
have to re-invent the wheel. Just like NUM_JOBS, the build type, compiler, 
build target, etc. are all things one would want to customize. 
    
    
    > On Jun 12, 2016, at 16:43, Zuyu ZHANG <[email protected]> wrote:
    > 
    > In build/profile_build.sh 
<https://github.com/apache/incubator-quickstep/pull/22#discussion_r66728135>:
    > 
    > > +#       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`"
    > We may need to give users the ability to overwrite the number of 
concurrent jobs to run make.
    > 
    > To me, in some VM environments the build process would be killed due to 
out of memory unless we use 1 job to build, although it supports 4 build jobs.
    > 
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub 
<https://github.com/apache/incubator-quickstep/pull/22/files/4c7df5f592c0f9b52eebe0078e131b19b2d75e84#r66728135>,
 or mute the thread 
<https://github.com/notifications/unsubscribe/ACZB67FVSCk8VO9UD5fN06tRrMo3Kyv6ks5qLH1ogaJpZM4IyKVi>.
    > 
    



---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to