#------------------------------------
AC_CONFIG_FILES([Makefile
+ doc/dokuwiki-doc-stubber.pl
examples/math_xul_client/Makefile
+ examples/math_bench.pl
+ examples/math_client.py
+ examples/multisession-test.pl
src/Makefile
src/c-apps/Makefile
src/gateway/Makefile
src/python/Makefile
src/router/Makefile
src/srfsh/Makefile
- bin/osrf_config], [if test -e "./bin/osrf_config"; then chmod 755 bin/osrf_config; fi])
+ bin/osrf_config], [if test -e "./bin/osrf_config"; then chmod 755 bin/osrf_config; fi])
AC_OUTPUT
+++ /dev/null
-#!/usr/bin/perl
-use strict; use warnings;
-use OpenSRF::System;
-use Time::HiRes qw/time/;
-use OpenSRF::Utils::Logger;
-my $log = "OpenSRF::Utils::Logger";
-
-# Test script which runs queries agains the opensrf.math service and reports on
-# the average round trip time of the requests.
-
-# how many batches of 4 requests do we send
-my $count = $ARGV[0];
-print "usage: $0 <num_requests>\n" and exit unless $count;
-
-# * connect to the Jabber network
-OpenSRF::System->bootstrap_client( config_file => "SYSCONFDIR/opensrf_core.xml" );
-$log->set_service('math_bench');
-
-# * create a new application session for the opensrf.math service
-my $session = OpenSRF::AppSession->create( "opensrf.math" );
-
-my @times; # "delta" times for each round trip
-
-# we're gonna call methods "add", "sub", "mult", and "div" with
-# params 1, 2. The hash below maps the method name to the
-# expected response value
-my %vals = ( add => 3, sub => -1, mult => 2, div => 0.5 );
-
-# print the counter grid
-for my $x (1..100) {
- if( $x % 10 ) { print ".";}
- else{ print $x/10; };
-}
-print "\n";
-
-my $c = 0;
-
-for my $scale ( 1..$count ) {
- for my $mname ( keys %vals ) { # cycle through add, sub, mult, and div
-
- my $starttime = time();
-
- # * Fires the request and gathers the response object, which in this case
- # is just a string
- my $resp = $session->request( $mname, 1, 2 )->gather(1);
- push @times, time() - $starttime;
-
-
- if( "$resp" eq $vals{$mname} ) {
- # we got the response we expected
- print "+";
-
- } elsif($resp) {
- # we got some other response
- print "\n* BAD Data: $resp\n";
-
- } else {
- # we got no data
- print "Received nothing\n";
- }
-
- $c++;
-
- }
-
- print " [$c] \n" unless $scale % 25;
-}
-
-my $total = 0;
-
-$total += $_ for (@times);
-
-$total /= scalar(@times);
-
-print "\n\n\tAverage Round Trip Time: $total Seconds\n";
-
-
--- /dev/null
+#!/usr/bin/perl
+use strict; use warnings;
+use OpenSRF::System;
+use Time::HiRes qw/time/;
+use OpenSRF::Utils::Logger;
+my $log = "OpenSRF::Utils::Logger";
+
+# Test script which runs queries agains the opensrf.math service and reports on
+# the average round trip time of the requests.
+
+# how many batches of 4 requests do we send
+my $count = $ARGV[0];
+print "usage: $0 <num_requests>\n" and exit unless $count;
+
+# * connect to the Jabber network
+OpenSRF::System->bootstrap_client( config_file => "@sysconfdir@/opensrf_core.xml" );
+$log->set_service('math_bench');
+
+# * create a new application session for the opensrf.math service
+my $session = OpenSRF::AppSession->create( "opensrf.math" );
+
+my @times; # "delta" times for each round trip
+
+# we're gonna call methods "add", "sub", "mult", and "div" with
+# params 1, 2. The hash below maps the method name to the
+# expected response value
+my %vals = ( add => 3, sub => -1, mult => 2, div => 0.5 );
+
+# print the counter grid
+for my $x (1..100) {
+ if( $x % 10 ) { print ".";}
+ else{ print $x/10; };
+}
+print "\n";
+
+my $c = 0;
+
+for my $scale ( 1..$count ) {
+ for my $mname ( keys %vals ) { # cycle through add, sub, mult, and div
+
+ my $starttime = time();
+
+ # * Fires the request and gathers the response object, which in this case
+ # is just a string
+ my $resp = $session->request( $mname, 1, 2 )->gather(1);
+ push @times, time() - $starttime;
+
+
+ if( "$resp" eq $vals{$mname} ) {
+ # we got the response we expected
+ print "+";
+
+ } elsif($resp) {
+ # we got some other response
+ print "\n* BAD Data: $resp\n";
+
+ } else {
+ # we got no data
+ print "Received nothing\n";
+ }
+
+ $c++;
+
+ }
+
+ print " [$c] \n" unless $scale % 25;
+}
+
+my $total = 0;
+
+$total += $_ for (@times);
+
+$total /= scalar(@times);
+
+print "\n\n\tAverage Round Trip Time: $total Seconds\n";
+
+
+++ /dev/null
-#!/usr/bin/env python
-import osrf.system
-import osrf.ses
-
-# XXX: Replace with command line arguments
-file = '/openils/conf/opensrf_core.xml'
-operator = 'add'
-operand1 = 5
-operand2 = 7
-
-# Pull connection settings from <config><opensrf> section of opensrf_core.xml
-osrf.system.System.connect(config_file=file, config_context='config.opensrf')
-
-# Set up a connection to the opensrf.math service
-session = osrf.ses.ClientSession('opensrf.math')
-
-# Call one of the methods defined by the opensrf.math service
-request = session.request(operator, operand1, operand2)
-
-# Retrieve the response from the method
-response = request.recv(timeout=2)
-
-print(response.content())
-
-# Cleanup request and connection resources
-request.cleanup()
-session.cleanup()
--- /dev/null
+#!/usr/bin/env python
+import osrf.system
+import osrf.ses
+
+# XXX: Replace with command line arguments
+file = '@sysconfdir@/opensrf_core.xml'
+operator = 'add'
+operand1 = 5
+operand2 = 7
+
+# Pull connection settings from <config><opensrf> section of opensrf_core.xml
+osrf.system.System.connect(config_file=file, config_context='config.opensrf')
+
+# Set up a connection to the opensrf.math service
+session = osrf.ses.ClientSession('opensrf.math')
+
+# Call one of the methods defined by the opensrf.math service
+request = session.request(operator, operand1, operand2)
+
+# Retrieve the response from the method
+response = request.recv(timeout=2)
+
+print(response.content())
+
+# Cleanup request and connection resources
+request.cleanup()
+session.cleanup()
+++ /dev/null
-#!/usr/bin/perl
-use lib 'LIBDIR/perl5/';
-use OpenSRF::System;
-use OpenILS::Application::AppUtils;
-use OpenILS::Event;
-use OpenSRF::EX qw/:try/;
-use OpenSRF::Utils::JSON;
-use Data::Dumper;
-use OpenILS::Utils::Fieldmapper;
-use Digest::MD5 qw/md5_hex/;
-use OpenSRF::Utils qw/:daemon/;
-use OpenSRF::MultiSession;
-use OpenSRF::AppSession;
-use Time::HiRes qw/time/;
-
-my $config = shift;
-
-unless (-e $config) {
- die "Gimme a config file!!!";
-}
-OpenSRF::System->bootstrap_client( config_file => $config );
-
-if (!@ARGV) {
- @ARGV = ('open-ils.storage','opensrf.system.echo');
-}
-
-my $app = shift;
-
-my $count = 100;
-
-my $overhead = time;
-
-my $mses = OpenSRF::MultiSession->new( app => $app, cap => 10, api_level => 1 );
-
-$mses->success_handler(
- sub {
- my $ses = shift;
- my $req = shift;
- print $req->{params}->[0] . "\t: " . OpenSRF::Utils::JSON->perl2JSON($req->{response}->[0]->content)."\n";
- }
-);
-
-$mses->failure_handler(
- sub {
- my $ses = shift;
- my $req = shift;
- warn "record $req->{params}->[0] failed: " . OpenSRF::Utils::JSON->perl2JSON($req->{response});
- }
-);
-
-
-$mses->connect;
-
-my $start = time;
-$overhead = $start - $overhead;
-
-for (1 .. $count) {
- $mses->request( @ARGV,$_ );
-}
-$mses->session_wait(1);
-$mses->disconnect;
-
-my $end = time;
-
-my @c = $mses->completed;
-my @f = $mses->failed;
-
-my $x = 0;
-$x += $_->{duration} for (@c);
-
-print "\n". '-'x40 . "\n";
-print "Startup Overhead: ".sprintf('%0.3f',$overhead)."s\n";
-print "Completed Commands: ".@c."\n";
-print "Failed Commands: ".@f."\n";
-print "Serial Run Time: ".sprintf('%0.3f',$x)."s\n";
-print "Serial Avg Time: ".sprintf('%0.3f',$x/$count)."s\n";
-print "Total Run Time: ".sprintf('%0.3f',$end-$start)."s\n";
-print "Total Avg Time: ".sprintf('%0.3f',($end-$start)/$count)."s\n";
-
--- /dev/null
+#!/usr/bin/perl
+use lib '@libdir@/perl5/';
+use OpenSRF::System;
+use OpenILS::Application::AppUtils;
+use OpenILS::Event;
+use OpenSRF::EX qw/:try/;
+use OpenSRF::Utils::JSON;
+use Data::Dumper;
+use OpenILS::Utils::Fieldmapper;
+use Digest::MD5 qw/md5_hex/;
+use OpenSRF::Utils qw/:daemon/;
+use OpenSRF::MultiSession;
+use OpenSRF::AppSession;
+use Time::HiRes qw/time/;
+
+my $config = shift;
+
+unless (-e $config) {
+ die "Gimme a config file!!!";
+}
+OpenSRF::System->bootstrap_client( config_file => $config );
+
+if (!@ARGV) {
+ @ARGV = ('open-ils.storage','opensrf.system.echo');
+}
+
+my $app = shift;
+
+my $count = 100;
+
+my $overhead = time;
+
+my $mses = OpenSRF::MultiSession->new( app => $app, cap => 10, api_level => 1 );
+
+$mses->success_handler(
+ sub {
+ my $ses = shift;
+ my $req = shift;
+ print $req->{params}->[0] . "\t: " . OpenSRF::Utils::JSON->perl2JSON($req->{response}->[0]->content)."\n";
+ }
+);
+
+$mses->failure_handler(
+ sub {
+ my $ses = shift;
+ my $req = shift;
+ warn "record $req->{params}->[0] failed: " . OpenSRF::Utils::JSON->perl2JSON($req->{response});
+ }
+);
+
+
+$mses->connect;
+
+my $start = time;
+$overhead = $start - $overhead;
+
+for (1 .. $count) {
+ $mses->request( @ARGV,$_ );
+}
+$mses->session_wait(1);
+$mses->disconnect;
+
+my $end = time;
+
+my @c = $mses->completed;
+my @f = $mses->failed;
+
+my $x = 0;
+$x += $_->{duration} for (@c);
+
+print "\n". '-'x40 . "\n";
+print "Startup Overhead: ".sprintf('%0.3f',$overhead)."s\n";
+print "Completed Commands: ".@c."\n";
+print "Failed Commands: ".@f."\n";
+print "Serial Run Time: ".sprintf('%0.3f',$x)."s\n";
+print "Serial Avg Time: ".sprintf('%0.3f',$x/$count)."s\n";
+print "Total Run Time: ".sprintf('%0.3f',$end-$start)."s\n";
+print "Total Avg Time: ".sprintf('%0.3f',($end-$start)/$count)."s\n";
+
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/opensrf_core.xml.example'
sed -i 's|LOCALSTATEDIR|$(VAR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '$(DESTDIR)@sysconfdir@/srfsh.xml.example'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/examples/math_bench.pl'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/examples/math_client.py'
- sed -i 's|LIBDIR|$(LIBDIR)|g' '@abs_top_srcdir@/examples/multisession-test.pl'
- sed -i 's|SYSCONFDIR|$(ETCDIR)|g' '@abs_top_srcdir@/doc/dokuwiki-doc-stubber.pl'
cp -r @srcdir@/javascript/* $(jsdir)/