timing ​
Implementation level ​
Type | Status |
---|---|
CML extraction template | |
HTML5 representation |
Template attributes ​
Attribute | Value |
---|---|
source | CASTEP log |
id | timing |
name | CASTEP timing section |
pattern | \s*Initialisation\stime.* |
endPattern | \s*Peak\sMemory\sUse.* |
endPattern2 | ~ |
endOffset | 1 |
xml:base | timing.xml |
Input ​
Initialisation time = 6.78 s
Calculation time = 4.92 s
Finalisation time = 0.06 s
Total time = 11.76 s
Peak Memory Use = 853140 kB
Output text ​
xml
<comment class="example.output" id="timing">
<module cmlx:templateRef="timing">
<scalar dataType="xsd:string" dictRef="ca:inittime" units="si:s">6.78</scalar>
<scalar dataType="xsd:string" dictRef="ca:calctime" units="si:s">4.92</scalar>
<scalar dataType="xsd:string" dictRef="ca:endtime" units="si:s">0.06</scalar>
<scalar dataType="xsd:string" dictRef="cc:wallTtime" units="si:s">11.76</scalar>
<scalar dataType="xsd:integer" dictRef="ca:peakmem" units="nonsi2:kilobyte">853140</scalar>
</module>
</comment>
Template definition ​
xml
<record>\s*Initialisation\stime\s*={A,ca:inittime}s\s*</record>
<record>\s*Calculation\stime\s*={A,ca:calctime}s\s*</record>
<record>\s*Finalisation\stime\s*={A,ca:endtime}s\s*</record>
<record>\s*Total\stime\s*={A,cc:wallTtime}s\s*</record>
<record>\s*Peak\sMemory\sUse\s*={I,ca:peakmem}.*</record>
<transform process="pullup" xpath=".//cml:scalar" />
<transform process="delete" xpath=".//cml:list" />
<transform process="addUnits" xpath=".//cml:scalar[not(@dictRef='ca:peakmem')]" value="si:s" />
<transform process="addUnits" xpath=".//cml:scalar[@dictRef='ca:peakmem']" value="nonsi2:kilobyte" />