Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Examples: add times target

This creates a large (~8MB) XML document, reads it into
the dom and writes a cannonical version. Timing this
operation gives a reasonable overview of the performance of
FoX.
  • Loading branch information...
commit 0a56452f9d8f4a89d3c56ab308f683c3604d33e1 1 parent 7ff99f6
@andreww authored
Showing with 26 additions and 1 deletion.
  1. +26 −1 examples/Makefile
View
27 examples/Makefile
@@ -14,6 +14,31 @@ wcml_lib: wxml_lib wcml_example$(EXEEXT)
wkml_lib: wxml_lib wkml_example$(EXEEXT) wkml_example_2$(EXEEXT)
wxml_lib: wxml_example$(EXEEXT)
+times: time_test.xml dom_canonicalize.ns.yes.exe
+ @echo "Timing test is to cannonicalize file: " `du -h test.xml`
+ ./dom_canonicalize.ns.yes.exe
+
+time_test.xml: test.xml
+
+test.xml:
+ @echo "Creating data file test.xml ..."
+ @echo "<?xml version='1.0' encoding='utf-8'?>" > test.xml
+ @echo "<data xmlns='http://www.xml-cml.org/schema'>" >> test.xml
+ @echo "<line>" >> test.xml ;
+ @for i in {1..10000}; \
+ do \
+ for i in {1..10} ; \
+ do \
+ echo "$j 1.206365800459885 0.1074916670129148 0.02144660316977548 0.005740756862772227\c " >> test.xml ;\
+ done; \
+ done
+ @echo "</line>" >> test.xml ;
+ @echo "</data>" >> test.xml
+ @echo " ... done"
+
+time_clean:
+ rm -f test.xml
+
# Note that we cannot use $< below since IBM make doesn't understand it.
dom_canonicalize.ns.no.exe: dom_canonicalize.ns.no.$(OBJEXT) ../objs/lib/libFoX_dom.$(LIBEXT) ../objs/lib/libFoX_sax.$(LIBEXT) ../objs/lib/libFoX_wxml.$(LIBEXT) ../objs/lib/libFoX_common.$(LIBEXT) ../objs/lib/libFoX_fsys.$(LIBEXT)
@@ -45,5 +70,5 @@ wkml_example$(EXEEXT): wkml_example.$(OBJEXT) ../objs/lib/libFoX_wkml.$(LIBEXT)
wkml_example_2$(EXEEXT): wkml_example_2.$(OBJEXT) ../objs/lib/libFoX_wkml.$(LIBEXT) ../objs/lib/libFoX_wxml.$(LIBEXT) ../objs/lib/libFoX_common.$(LIBEXT) ../objs/lib/libFoX_fsys.$(LIBEXT)
$(FC) $(FFLAGS) $(LDFLAGS) $(LINK_O_FLAG) $@ wkml_example_2.$(OBJEXT) $$(../FoX-config --libs --wkml)
-clean:
+clean: time_clean
rm -f *.$(OBJEXT) *.$(MOD_EXT) $(EXAMPLES) wkml_example.kml wkml_example_2.kml dom_example_3.xml
Please sign in to comment.
Something went wrong with that request. Please try again.