Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

for paper

  • Loading branch information...
commit e4f27e27150ab0d4541fb842a1dcd4992c9adf0b 1 parent 20788ce
Chris Mungall cmungall authored
Showing with 74 additions and 11 deletions.
  1. +21 −11 benchmarks/Makefile
  2. +53 −0 benchmarks/parse-bench.pl
32 benchmarks/Makefile
View
@@ -1,6 +1,6 @@
ONTS1 = CL CARO SO FBbt GO
ONTS2 = obi ido
-ONTS3 = wine pizza Hydrology country
+ONTS3 = wine pizza Hydrology country NCIThesaurus
THEA_TARGETS = $(patsubst %,bench1-%.out,$(ONTS1)) $(patsubst %,bench2-%.out,$(ONTS2)) $(patsubst %,bench3-%.out,$(ONTS3))
@@ -11,24 +11,34 @@ all: $(THEA_TARGETS) $(OWLAPI_TARGETS)
show:
echo $(TARGETS)
+#old
+dn1-%.owl:
+ wget http://purl.org/obo/owl/$* -O $@
+.PRECIOUS: dn1-%.owl
+
+#new
+dn2-%.owl:
+ wget http://purl.obolibrary.org/obo/$*.owl -O $@
+.PRECIOUS: dn2-%.owl
+
# old-style OBO URLs
-bench1-%.out:
- ../bin/thea-owl-i --format owl --debug bench --import --statistics http://purl.org/obo/owl/$* > $@ 2>&1
+bench1-%.out: dn1-%.owl
+ ../bin/thea-owl-i --format owl --debug bench --import --statistics $< > $@ 2>&1
# new-style OBO URLs
-bench2-%.out:
- ../bin/thea-owl-i --format owl --debug bench --import --statistics http://purl.obolibrary.org/obo/$*.owl > $@ 2>&1
+bench2-%.out: dn2-%.owl
+ ../bin/thea-owl-i --format owl --debug bench --import --statistics $< > $@ 2>&1
# smaller owl files that are distributed in the thea directory
-bench3-%.out:
+bench3-%.out:
../bin/thea-owl-i --format owl --debug bench --import --statistics ../testfiles/$*.owl > $@ 2>&1
-owlapi1-%.out:
- (time owlreasoner --no-reasoner http://purl.org/obo/owl/$*) > $@ 2>&1 || echo ok
+owlapi1-%.out: dn1-%.owl
+ (time owlreasoner --no-reasoner file:$<) > $@ 2>&1 || echo ok
-owlapi2-%.out:
- (time owlreasoner --no-reasoner http://purl.obolibrary.org/obo/$*.owl) > $@ 2>&1 || echo ok
+owlapi2-%.out: dn2-%.owl
+ (time owlreasoner --no-reasoner file:$<) > $@ 2>&1 || echo ok
owlapi3-%.out:
- (time owlreasoner --no-reasoner file:../testfiles/wine.owl file:../testfiles/$*.owl) > $@ 2>&1 || echo ok
+ (time owlreasoner --no-reasoner file:../testfiles/$*.owl) > $@ 2>&1 || echo ok
53 benchmarks/parse-bench.pl
View
@@ -0,0 +1,53 @@
+#!/usr/bin/perl -w
+
+use strict;
+
+while (my $f = shift @ARGV) {
+ if ($f =~ /bench\d\-(\S+).out/) {
+ parse_bench($f,$1);
+ }
+ elsif ($f =~ /owlapi\d\-(\S+).out/) {
+ parse_owlapi($f,$1);
+ }
+ else {
+ die $f;
+ }
+}
+exit 0;
+
+sub parse_bench {
+ my $f = shift;
+ my $id = shift;
+ open(F,$f) || die $f;
+ while (<F>) {
+ if (/load_time:\s+(\S+)/) {
+ print "TIME\tTHEA\t$id\t$1\n";
+ }
+ if (/^Heap\s+:\s+(\d+),(\d+),(\d+) Bytes/) {
+ my $m = $1*1000000 + $2*1000 + $3;
+ $m /= 1000000;
+ print "MEM\tTHEA\t$id\t$m\n";
+ }
+ }
+ close(F);
+}
+
+sub parse_owlapi {
+ my $f = shift;
+ my $id = shift;
+ my $n=0;
+ open(F,$f);
+ while (<F>) {
+ if (/^real\s+(\d+)m(\S+)s/) {
+ my $s = $1 * 60 + $2;
+ print "TIME\tOWLAPI\t$id\t$s\n";
+ }
+ if (/diff:(\d+)\s+\(bytes/) {
+ $n++;
+ my $m = $1/1000000;
+ print "MEM\tOWLAPI\t$id\t$m\n"
+ if $n == 2;
+ }
+ }
+ close(F);
+}
Please sign in to comment.
Something went wrong with that request. Please try again.