Skip to content

How can I measure how long each preprocessing step takes? #3995

Answered by chrispy-snps
chrispy-snps asked this question in Q&A
Discussion options

You must be logged in to vote

To measure the runtime of each processing step of a DITA-OT transformation, you can do the following:

  1. Enable Ant profiling by setting the following variable in your environment:

    # bash
    export ANT_ARGS="-logger org.apache.tools.ant.listener.ProfileLogger"
    
    # csh/tcsh
    setenv ANT_ARGS "-logger org.apache.tools.ant.listener.ProfileLogger"
    
  2. Run your transformation and redirect the output to a log file:

    dita ... > out.log
    
  3. Use the attached script to extract the per-target runtimes:

    extract_target_runtimes.pl out.log
    

    Script attachment: extract_target_runtimes.zip

The script extracts the information added by the Ant profile logger, filters any targets that complete in less than one secon…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by chrispy-snps
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants