mirror of https://github.com/swig/swig
added profile test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5983 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
b2ede29b59
commit
eea53dbb48
|
@ -0,0 +1,15 @@
|
|||
import profiletest.*;
|
||||
|
||||
public class profiletest_runme {
|
||||
|
||||
System.loadLibrary("profiletest");
|
||||
|
||||
public static void main(String argv[]) {
|
||||
|
||||
long a = profiletest.new_A();
|
||||
long b = profiletest.new_B();
|
||||
for (int i=0; i<1000000; i++) {
|
||||
a = profiletest.B_fn(b, a);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
catch { load ./profiletest.so profiletest}
|
||||
catch { load ./profiletest.dll profiletest} ;# Windows
|
||||
|
||||
set a [new_A]
|
||||
set b [new_B]
|
||||
|
||||
for {set i 0} {$i < 1000000} {incr i 1} {
|
||||
set a [B_fn $b $a]
|
||||
}
|
Loading…
Reference in New Issue