Project

General

Profile

« Previous | Next » 

Revision 1853

input.Makefile: Import: If profile is on and test mode is on, output formatted profile stats to stdout

View differences:

input.Makefile
224 224

  
225 225
ifneq ($(dbExport)$(inputFiles),)
226 226

  
227
profileTest = $(if $(profile),$(if $(test),1))
228
profileOnly = -env profile_to=/dev/fd/3 $(map2db) 3>&1 1>&2|\
229
$(bin)/profile_stats /dev/fd/0
230

  
227 231
log_ = import/$*$(if $(n),.n=$(n),).$(date).log
228 232
trace = $(log_:.log=.trace)
229
import = -(set -x; "time" env commit=1\
233
import = -$(if $(profileTest),$(profileOnly),(set -x; "time" env commit=1\
230 234
$(if $(profile),profile_to=$(trace)) $(map2db)) $(if $(log),\
231
$(if $(n),,>>$(log_))) 2>&1$(if $(log),$(if $(n),|tee -a $(log_)))
235
$(if $(n),,>>$(log_))) 2>&1$(if $(log),$(if $(n),|tee -a $(log_))))
232 236
# don't abort on import errors, which often relate to invalid input data
233 237

  
234 238
import: $(addprefix import-,$(tables)) _always ;

Also available in: Unified diff