File: results.xml

package info (click to toggle)
xmlbeans 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 18,368 kB
  • sloc: java: 133,868; xml: 40,717; sh: 688; sql: 48; makefile: 12
file content (88 lines) | stat: -rw-r--r-- 3,098 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
<!--
    Copyright 2004 The Apache Software Foundation

    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.
-->
<!-- build file -->
<project name="xmlbeans-perf" default="usage">

	<target name="usage">
		<echo>
	This utility takes a flat file and emits an instance of perf-results.xsd.
	The ant task extends the MatchingTask class, so many files may be processed
	at a time. The format of a flat perf test result is like the following (all on one line):
	
	[delimeter] [testname] time [long time value] hash [int hash value] customparam=customparamvalue

	or

	[delimeter] [testname] memory [long memory value] hash [int hash value] customparam=customparamvalue

	----------------------------------------------------
	For example, a file call foo.log that contains this:

	TEST: mytest time 100 hash -1234 color=blue type=invalid

	could be processed like this:

	ant generate.results -Ddelimeter="TEST:" -Dsrcdir="." -Dincludes="foo.log"

	This would emit a file called foo.log.xml.

	There are default values for all possible parameters. View contents of this file to see them.

		</echo>
	</target>

	
	<property environment="env"/>

	<!-- root properties used for finding everything -->
	<property name="xmlbeans.perf.root" value="${basedir}"/>
	<property name="v2.xmlbeans.root" value="${env.XMLBEANS_HOME}"/>
	<property name="build.dir" value="${xmlbeans.perf.root}/build"/>

	<!-- default properties for results generation -->
	<property name="srcdir" value="${xmlbeans.perf.root}/bin"/>
	<property name="gendir" value="${xmlbeans.perf.root}/reports"/>
	<property name="includes" value="*.log"/>
	<property name="hostname" value="cg2kperf05.beanw.com"/>
	<property name="cpuinfo" value="2 x 2.7Ghz"/>
	<property name="sysmem" value="2G"/>
	<property name="delimiter" value="TEST: "/>

	<!-- lib directories -->
	<property name="v2.lib.dir" value="${v2.xmlbeans.root}/build/lib"/>

	<!-- util schema jar(s) -->
	<property name="perf-results.jar" value="${xmlbeans.perf.root}/schema_build/perf-results.jar"/>

	<!-- classpath(s) -->
	<path id="result.classpath">
		<fileset dir="${v2.lib.dir}" includes="*.jar"/>
		<pathelement path="${build.dir}"/>
		<pathelement path="${perf-results.jar}"/>
		<pathelement path="${ant.jar}"/>
	</path>


	<taskdef name="perf-result" classname="org.apache.xmlbeans.test.tools.PerfResultTask" classpathref="result.classpath"/>
	<target name="generate.results">
		<perf-result srcdir="${srcdir}" 
					 includes="${includes}"
					 gendir="${gendir}"
					 delimiter="${delimiter}"
					 hostname="${hostname}"/>
	</target>

</project>