Best way to test performance?

As there is no pure java cycle test method, I constructed a simple class to test the basic performance boost of using a StringBuffer over a standard String object.
Is the following code sample the best solution to detecting performance? Are there any obvious errors within my code? Am i forgetting anything?
Thanks
Antony Ribot
// Antony Ribot - 22nd May 2002 - String / StringBuffer Performance
// Under tests of (Integer.MAX_VALUE/2) I got the following results:
// String: 724903
// StringBuffer: 145409 (4.98 times faster)
public class StringPerf {
private long sStartTime, sEndTime, sbStartTime, sbEndTime;
final static int ITERATIONS = Integer.MAX_VALUE/2;
public static void main (String[] args) {
StringPerf sp = new StringPerf();
private StringPerf() {
stringTest();
stringBufferTest();
showResults(); // output final results of test
private void stringTest() {
String s = new String();
sStartTime = System.currentTimeMillis();
for (int i = 0; i < ITERATIONS; i++) {
s = s + "";
sEndTime = System.currentTimeMillis();
showResults("string", sStartTime, sEndTime); // output quickview result
private void stringBufferTest() {
StringBuffer sb = new StringBuffer();
sbStartTime = System.currentTimeMillis();
for (int i = 0; i < ITERATIONS; i++) {
sb.append("");
sbEndTime = System.currentTimeMillis();
showResults("String b", sbStartTime, sbEndTime); / output quickview result
private void showResults() {
System.out.println("\n--------------------------------------------------");
System.out.println("String test: " + (sEndTime - sStartTime) );
System.out.println("String b test: " + (sbEndTime - sbStartTime) );
private void showResults(String s, long start, long end) {
System.out.println(s + ": " + (end - start));
}

I have now created the following extra code:
...But I'm sure I've gone the wrong way around to solve the problem - am I really testing the speed of the substring() and deleteAtChar() or are they made unreliable by the way I am reassigning the text string?
e.g: tmpString = TEXTBLOCK; tmpBufString.append(TEXTBLOCK);     
Is there a better way to test this (I'm sure there is). :) One solution could be to create an very long String / StringBuffer initially and then remove the outer loop all together?
Currently, results have shown the String.subString() to be 1.6 times faster.
Thanks
Antony Ribot
private String TEXTBLOCK = "Strings are constant; their values cannot be changed after they are created.";
private String tmpString = "";
private StringBuffer tmpBufString = new StringBuffer();
private void stringRemTest() {
sRemStartTime = System.currentTimeMillis();
for (int j = 0; j < ITERATIONS/100; j++) {
tmpString = TEXTBLOCK;          // <--- is this line getting in the way of my results??
for (int i = 0; i < TEXTBLOCK.length(); i++) {
tmpString = tmpString.substring(1);
sRemEndTime = System.currentTimeMillis();
showResults("StringRem", sRemStartTime, sRemEndTime);
private void stringBufferRemTest() {
sbRemStartTime = System.currentTimeMillis();
for (int j = 0; j < ITERATIONS/100; j++) {
tmpBufString.append(TEXTBLOCK);          // <--- is this line getting in the way of my results??
for (int i = 0; i < TEXTBLOCK.length(); i++) {
tmpBufString = tmpBufString.deleteCharAt(0);
sbRemEndTime = System.currentTimeMillis();
showResults("String b rem", sbRemStartTime, sbRemEndTime);
}

Similar Messages

  • Best way to test the planning function in BI7.0

    Hi
    How can we test the planning function other than the wizard.Can it be tested by creating an input ready query on the aggregation level whcih is created on the top of multiprovider joining real time info cube and standard info cube.
    Kind Regards,
    Sarah

    Testing the planning function in planning modeler and planning wizard is the fastest and the best way to verify the planning function.
    In planning modeler, you have the option of executing the planning function in trace mode which helps you to track the changes before and after execution.
    Moreover, if you want to test the PF on the input ready query, you gotta wait until the query is successfully  created in BEx or WAD.

  • Best way to improve performance?

    I'm using a Dual Core Intel Xeon and starting to do video work on it with Final Cut Pro, etc.
    I've got 8GB of DDR2 FB-DIMM at 667MHz.
    I'm using a Cinema HD display, driven by a NVIDIA GeForce 7300 GT.
    What would be your best advice at improving performance (if there is any). I doubt more RAM would help; not sure if there is anything faster than 667Mhz for this machine; Could a newer video card help rendering speed?
    I'm generally very happy with how things work, can't afford a new MacPro, and am simply wondering if I should invest in something more affordable that could give me a slightly better kick?
    Many thanks,
    Czet

    One thing that's always useful is to make sure you've got iStat installed and see how much of your RAM is actually being used because 8Gb is a lot, even for HD but it doesn't rule out a lack of RAM.
    The 'biggest' increase in speed I've ever seen on any of my kit was a SSD. I've setup my Mac Pro with 2 x 128Gb SSD in the 2nd optical bay (in a 3.5" RAID 0 caddy) and setup Final Cut Pro to use 2 x 1.5Tb Seagate 7200.4's in software RAID 0 and everything flies. A 256Gb SSD is far more expensive (and slower) than 2 x 128Gb's in a RAID 0 caddy so a no brainer.
    Graphics cards always help but in my experience the only place you'll notice significant improvements are Games and software such as Motion/Aperture where you really must have a decent card.

  • What is the best way to test for collisions between objects?

    I am in the process of developing my first game, my first decent game that is. I understand how to develop the background and tileset for the game, but have yet to figure out an effective way of testing for collisions. As in you try to move the character into a wall, or another object on the level.
    If I divide the level into tiles, it won't be to hard, but I am thinking I want to have the hero be able to move all over the place, not just from square to square.
    Any suggestions or ideas will be greatly appreciated

    If I divide the level into tiles, it won't be to hard,
    but I am thinking I want to have the hero be able to
    move all over the place, not just from square to
    square.Err...
    So if the hero is not on a square, the hero is not on a tile and consequently is not on a visible aspect of the game world?
    I suspect that you wanted the hero to be able to move in any direction, not just the standard cardinal directions.
    If you're using tiles to represent the game world, then the solution is simple - check to see if there's anything "solid" already on the target tile. If there is, abort the move and report it as a collision. If there isn't, permit the move.
    It's only when you have a tile-less world that you actually have to determine if the leading edge of your hero crosses the boundary of an item (or border) that he shouldn't be allowed to cross. Doing so is complicated enough that I would simply suggest that you search the forum for third party collision detection packages that you can borrow.

  • What is the best way to test connection keys?

    I've created multiple connection key for various rolse on a
    new site. When I select the key it asks if I want to replace the
    existing connection, which I really don't want to do.
    What is the best way to handle this so the administrative
    connection is not affected?

    Also create a connection key for you administrator role, so
    you can swiftly switch back.

  • Best way to test suspicious PDF files?

    I was wondering what the safest way to test suspicious PDF files was.  I was also wondering how to qualify a PDF as suspicious.  I was using PDFid to scan a PDF and I found it had 1 acroform and 1 openaction.  It didn't say it had javascript, but I was reading that acroform can let you use certain javascript.
    Does xpdf support javascript?  Would it be safe to open a pdf in xpdf assuming it had no libtiff exploit or what have you?
    Input would be greatly appreciated.

    jnguyen wrote:
    You could run qemu-kvm or virtualbox and open the PDF within there. This won't tell you whether a PDF file is dangerous though, unless it does something really obvious (e.g. crash the virtual machine or delete all your files).
    You could also try use Mandatory Access Control, such as TOMOYO Linux, AppArmor or SELinux. The advantage of these is that you will also be able to tell if the PDF is doing something suspicious by looking at audit logs, and you also won't have to fire up a virtual machine every time. Disadvantage is that you have to learn how to use these powerful security tools. TOMOYO Linux and AppArmor are much easier to learn than SELinux, but SELinux has a tool specifically designed for sandboxing. TOMOYO Linux 2.3 is also already in the [community] repo (just do pacman -S tomoyo-tools). See the wiki pages for more information:
    TOMOYO Linux
    AppArmor
    SELinux
    Ah, cool!  I've heard of AppArmor before.  SELinux sounds familiar and I'm glad to hear it has a sandbox.  Haven't heard of TOMOYO, but I'm excited to learn about it. 
    Thanks!

  • [solved] Best way to test for record in sqlite3 db?

    In a bash script, I need to know if a sqlite3 'SELECT ... WHERE' operation finds any matches.  I don't need the output; I just need to know if a match is found.  My thought was to do
    if [[ "$(sqlite3 ... "SELECT ..." )" ]];then ...
    Is there a better way to do it?
    Bonus question: if searching a primary key or unique column, is a ' SELECT ... WHERE foo="bar" ' operation smart enough to stop when it finds a match, or will it continue through the rest of the table?
    Thanks.
    Last edited by alphaniner (2012-04-26 14:51:36)

    @alphaniner: Primary key columns are usually indexed, hence a query for a primary key column will not traverse the table, but perform an index lookup. Since primary keys are unique this will end up at a single row.
    To test for existence of a row, you'd usually use "select exists(select 1 from <table> where <condition>)".  This will output 1, if the row exists, and 0 otherwise. I don't know whether the exit state of the "sqlite" tool is reliable, but testing the output will be with this query.
    And again: If you're doing this kind of stuff, you're better off with a real languages with data types and the like. Python provides SQLite support in the standard library.

  • Best way to test each if else statement

    Hey everyone I have a few scripts that have many different if ,elseif, else blocks. The problem is that they are hard to test and some are rarely triggered. However I need to check to make sure the contents triggered by one of the statements works. I know
    there is a whatif switch but from my understanding it is only used for specific commands and doesn't actually trigger them. 
    So is there some way to debug them or force the script to meet a condition of an if statement?
    Thanks for any help!!

    Hi,
    I generally put a Write-Output in each branch that will tell me where I am. Here's an example:
    $trigger = 1
    If ($trigger -eq 1) {
    Write-Output 'Found #1'
    } ElseIf ($trigger -eq 2) {
    Write-Output 'Found #2'
    } ElseIf ($trigger -eq 3) {
    Write-Output 'Found #3'
    } Else {
    Write-Output 'Found something else'
    Don't retire TechNet! -
    (Don't give up yet - 13,085+ strong and growing)

  • Is this the best way to test a prime number?

    Ok so I think I finally got my program to work. I tested It with very big 8 digit prime numbers if that means anything. here are 2 Questions about my program"
    -Is this a way of finding prime numbers? (does the program fulfill its purpose?)
    and Second is there a smarter way of doing it?
    Here is the program:
    //This program tests if a number is a prime number
    import java.util.Scanner;
    public class Main
    public static void main ( String args [ ] )
    Scanner input = new Scanner( System.in );
    int number;
    int bob;
    System.out.print(" Enter the number you wish to test:\n");
    number = input.nextInt();
    if (number == 1)
    System.out.print(" 1 is divisible only by 1, therefore it is not prime or composite\n");
    if (number == 2)
    System.out.print(" It's Prime\n ");
    for ( int test = 2 ; test < number ; test++ )
    bob = number % test;
    if ( bob == 0)
    System.out.print("It's Composite\n");
    return;
    System.out.println("It's Prime");
    }

    I got interested in this ...
    //1. PrimeTester_BruteForce: found 3001134 primes <= 50000000 in 410500 milliseconds
    //2. PrimeTester_SieveOfEratosthenes: found 3001134 primes <= 50000000 in 4422 milliseconds
    //3. PrimeTester_SieveOfAtkin: found 3001134 primes <= 50000000 in 24843 milliseconds
    ... so Wkipedia's SieveOfAtkin algorithm apparently requires some serious optimization before it outruns the Greeks... see http://cr.yp.to/primegen.html for an optimized C implementation (which I can't follow).
    PrimeTester_BruteForce.java//find all prime numbers upto the given maximum.
    //Using the brute force method
    //http://www.newton.dep.anl.gov/newton/askasci/1995/math/MATH039.HTM
    //PrimeTester_BruteForce: found 3001134 primes <= 50000000 in 410500 milliseconds
    import java.io.PrintWriter;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    public class PrimeTester_BruteForce {
         public static void main(String[] argv) throws IOException {
              long start = System.currentTimeMillis();
              PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("PrimeTester_BruteForce.txt")));
              int limit = 50000000;
              int count = 0;
    nextn:     for (int n=2; n<=limit; n++) {
                   int top = (int)Math.sqrt(n);
                   for(int i=2; i<=top; i++) {
                        if(n%i==0) {
                             continue nextn;
                   out.print(n);
                   out.print(" ");
                   if(++count%20==0) out.println();
              long took = System.currentTimeMillis()-start;
              out.println();
              out.println("PrimeTester_BruteForce: found "+count+" primes <= "+limit+" in "+took+" milliseconds");
              out.close();
    PrimeTester_SieveOfEratosthenes.java/******************************************************************************
    //find all prime numbers upto the given maximum.
    //http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes
    limit = 1000000;       // arbitrary search limit
    // pressume all are prime
    for (i=2; i<=limit; i++) is_prime[i] = true;
    // eliminate multiples of each prime, starting with its square
    for (n=2; n<=sqrt(limit); n++) {
       if (is_prime[n]) {
          for (i=n^2; i<=limit; i+=n) is_prime[i] = false;
    // print the results
    for (n=2; n=<limit; n++) {
      if (is_prime[n]) print(n);
    //PrimeTester_SieveOfEratosthenes: found 164185 primes <= 1000000 in 125 milliseconds
    import java.io.PrintWriter;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    public class PrimeTester_SieveOfEratosthenes {
         public static void main(String[] argv) throws IOException {
              long start = System.currentTimeMillis();
              PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("PrimeTester_SieveOfEratosthenes.txt")));
              int limit = 50000000;
              int n, i;
              boolean[] is_prime = new boolean[limit+1];
              // pressume all are prime
              is_prime[2] = true;
              for (i=2; i<=limit; i++) {
                   is_prime[i] = true;
              // eliminate multiples of each prime, starting with its square
              for (n=1; n<=Math.sqrt(limit); n++) {
                   if (is_prime[n]) {
                        for (i=n*2; i<=limit; i+=n) {
                             is_prime[i] = false;
              // print the results
              int count = 0;
              for (n=2; n<=limit; n++) {
                   if (is_prime[n]) {
                        out.print(n);
                        out.print(" ");
                        if(++count%20==0) out.println();
              long took = System.currentTimeMillis()-start;
              out.println();
              out.println("PrimeTester_SieveOfEratosthenes: found "+count+" primes <= "+limit+" in "+took+" milliseconds");
              out.close();
    PrimeTester_SieveOfAtkin.java/******************************************************************************
    //find all prime numbers upto the given maximum.
    //http://en.wikipedia.org/wiki/Sieve_of_Atkin
    limit = 1000000; // Arbitrary search limit
    array is_prime[5:limit] initial false; // Sieve array.
    biginteger x,y,n,k; // Must be able to hold 5*limit: 4x^2 + y^2!
    // put in candidate primes: integers which have an odd number of representations
    // by certain quadratic forms.
    for x:=1:sqrt(limit) do
    for y:=1:sqrt(limit) do
       n:=4x^2 + y^2; if n<=limit and n%12 = 1 or 5 then is_prime[n]:=not is_prime[n];
       n:=3x^2 + y^2; if n<=limit and n%12 = 7 then is_prime[n]:=not is_prime[n];
       n:=3x^2 - y^2; if n<=limit and x>y and n%12 = 11 then is_prime[n]:=not is_prime[n];
    next y;
    next x;
    // eliminate composites by sieving
    // if n is prime, omit all multiples of its square; this is sufficient because
    // composites which managed to get on the list cannot be square-free
    for n:=5:sqrt(limit) do
      if is_prime[n] then for k:=n^2:limit:n^2 do is_prime[k]:=false; next k;
    next n;
    // Present the results.
    print 2, 3; for n:= 5:limit do if is_prime[n] then print n; next n;
    //PrimeTester_SieveOfAtkin: found 441 primes <= 1000000 in 203 milliseconds
    import java.io.PrintWriter;
    import java.io.BufferedWriter;
    import java.io.FileWriter;
    import java.io.IOException;
    public class PrimeTester_SieveOfAtkin {
         public static void main(String[] argv) throws IOException {
              long start = System.currentTimeMillis();
              PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("PrimeTester_SieveOfAtkin.txt")));
              int limit = 50000000;
              int sqrt = (int)Math.sqrt(limit);
              boolean[] is_prime = new boolean[limit+1]; // Sieve array.
              int x, y, n, k; // Must be able to hold 5*limit: 4x^2 + y^2!
              // put in candidate primes: integers which have an odd number of representations by certain quadratic forms.
              for (x=1; x<=sqrt; x++) {
                   for (y=1; y<=sqrt; y++) {
                        //n=(4*(x^2)) + y^2; if (n<=limit && n%12 in(1,5)) is_prime[n] = !is_prime[n];
                        int xSq = (int)Math.pow(x,2);
                        int ySq = (int)Math.pow(y,2);
                        n = 4*xSq + ySq;
                        if (n<=limit && (n%12==1||n%12==5)) {
                             is_prime[n]= !is_prime[n];
                             //debug("A: x="+x+", y="+y+", is_prime["+n+"]="+is_prime[n]);
                        //n=((3*(x^2)) + y^2; if (n<=limit && n%12==7) is_prime[n] = !is_prime[n];
                        n = 3*xSq + ySq;
                        if (n<=limit && n%12==7) {
                             is_prime[n]= !is_prime[n];
                             //debug("B: x="+x+", y="+y+", is_prime["+n+"]="+is_prime[n]);
                             //debug("   if (n<=limit:"+limit+" && n%12:"+(n%12)+"==7");
                             //debug("   (3*(x^2)):"+xSq+" + (y^2):"+ySq);
                        //n=((3*(x^2)) - y^2; if (n<=limit && x>y && n%12==11) is_prime[n]= !is_prime[n];
                        n = 3*xSq - ySq;
                        if (n<=limit && x>y && (n%12==11)) {
                             is_prime[n]= !is_prime[n];
                             //debug("C: x="+x+", y="+y+", is_prime["+n+"]="+is_prime[n]);
                   }//next y
              }//next x
              // eliminate composites by sieving
              // if n is prime, omit all multiples of its square; this is sufficient because
              // composites which managed to get on the list cannot be square-free
              // for (n:=5:sqrt(limit)) {
              //   if (is_prime[n]) for (k:=n^2:limit:n^2) is_prime[k]:=false;
              for (n=5; n<=sqrt; n++) {
                   if (is_prime[n]) {
                        int nSq = (int)Math.pow(n,2);
                        for(k=nSq; k<=limit; k+=nSq) {
                             is_prime[k]=false;
                             //debug("D: n="+n+" is_prime["+k+"]="+is_prime[k]);
              // Present the results.
              int count = 2;
              out.print("2 3 ");
              for(n=5; n<=limit; n++) {
                   if(is_prime[n]) {
                        out.format("%d ", n);
                        if(++count%20==0) out.println();
              long took = System.currentTimeMillis()-start;
              out.println();
              out.println("PrimeTester_SieveOfAtkin: found "+count+" primes <= "+limit+" in "+took+" milliseconds");
              out.close();
         //private static void debug(String msg) {
         //     System.out.println(msg);
    }

  • What is the best way of testing a custom web service

    We have a custom developed service (a jar sitting in the xmlpserver/WEB-INF/lib folder) on the BI Publisher server. This service uses the BookBinder class to concatenate some documents.
    We call this service through Axis (PublicReportService_v11) from a 3rd party application, passing in all the details to complete the call.
    I inherited this peace of code and now I need to build some kind of automated test to make sure the service is properly tested. We are using version 10.1.3.4.1.
    I started writing a Java application to send requests but I'm not too sure how to call our custom service. The code looks something like this:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class Test_Web_Service
    public static void main(String [] args) throws Exception {
    try {
    String endpoint = "http://bipserver:port/xmlpserver/services/PublicReportService_v11";
    Service service = new Service();
    Call call= (Call) service.createCall();
    call.setProperty( call.USERNAME_PROPERTY, "bob" );
    call.setProperty( call.SPASSWORD_PROPERTY, "pw");
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );
    call.setOperationName(new QName("http://bipserver:port/xmlpserver/services/PublicReportService_v11","myCustomService"));
    String ret = (String) call.invoke( new Object[] {""} );
    System.out.println("Sent '20', got '" + ret + "'");
    } catch (Exception e) {
    System.err.println(e.toString());
    I'm getting a NullPointerException.
    Edited by: user612544 on 28-Feb-2013 07:13

    I'd recommend a tool like SoapUI (http://www.soapui.org/) - the basic version is free and probably all you'll need.
    Barry Goodsell.
    Please mark as answered if helpful

  • What is the best way to test my superdrive?

    Hello there;
    My mac is OS X LION 10.7.5. I, have tried to install winodws 8.1 and when I was in the stage of installation it wont recognize my ISO file in my DVD disc. So is this enough to declare disc cluprit? or there is a kind of test that my be run and verify disc functionality? My other If it's problem and want to purchase a new DVD drive, I, am thinking of Blue-ray. is it compatible to my current OS.
    Thanks.

    Also create a connection key for you administrator role, so
    you can swiftly switch back.

  • Best way to test site??

    I am preparing to make changes to our left side navigation which is in a template - I don't want to be making these changes to our live site so I set-up a test site using our local network as the server. (Read into the testing server, but found this is for rich content and we just use HTML). I've downloaded all our files to my local test site folder and will be making the changes and testing thru dreamweaver 5.5 which i new to me - do i use the browser lab? (Haven't watched that tutorial yet)
    Thank you!!

    I am preparing to make changes to our left side navigation which is in a template - I don't want to be making these changes to our live site
    Actually, you can do this with the following steps:
    Open and save the Template file with a new name.
    Make your changes to this new Template file, and spawn child pages as needed for testing. Give the child pages test names.
    When things look right and you are ready to go live with the changes, then rename the old Template (and refuse the prompt to update child pages).  Rename the new Template with the old template's name.  Adjust the links to correspond to the live page names.
    Save the finished Template and allow the changes to propagate.
    Upload the changed child pages.
    I've done this oodles of times, with no problems.

  • Looking for best way to test for a program

    I like test path better. My problem is through all the different versions of office they cant all install to the same directory. Research time.

    I'm writing a script that will automatically install Outlook 2010 if Office 2013, 2010, 2007, or 2003 are not installed. It's part of a script I already have each tech has to run locally due to management decisions(that I have no control over). Right now I prompt the tech if they want to install it. Then test for the installer and install it.
    PowershellDo{$outlook = read-host "Would you like to install Outlook 2010? y/n" IF ($outlook -eq "y") { If (Test-Path -Path C:\Update\outlook2010) { saps -filepath C:\update\outlook2010\setup.exe -wait } Else { Write-host "Outlook is not in the update folder!" -ForegroundColor Red } }ElseIF ($outlook -eq "n") { Write-Host "Please make sure there is an email client." -ForegroundColor Yellow }}While ('y','n' -notcontains $outlook)What I would like to do is remove the prompt as it's a volume license...
    This topic first appeared in the Spiceworks Community

  • Best way to Unit Test Controller Layer

    Hi, I was hoping to get the opinion on this matter. My group is currently discussing which method would be the best to Unit test the Controller Layer (using StrutsTestCase). Basically with StrutsTestCase, you can test your Action methods and verify that the action forwards to the correct place, or that certain errors come up. The problem is that these Action classes will make Model layer calls that affect the DB. Whats the best way to test the Action classes? Some possibilities are:
    #1) Make a mock model layer that instead of hitting the DB uses a "switch" statement to return the correct value.
    #2) Use a test DB to test this. The problem with this is that after running tests, you want to leave the test DB in the same state as when you started the test. This is not very easy to do if your web application only does inserts to the DB. In addition, the Model layer Unit testing will be designed such that it will insert, select, update, select, and delete (in that order), so the state of the DB will remain the same after the test is run (unless JUnit crashes halfway).
    #3) Use a copy of a test DB on your local computer. This is beneficial because you can do anything to the DB, and then just delete it because a "master" copy is located elsewhere. The problem with this is, we also hoped to do performance testing of the model layer by running multiple threads of the Model layer unit tests. This won't work now because each thread would make a copy of the master DB....
    Thanks for any suggestions you might have!
    -L

    I have never unit tested just a controller. I have always done end to end testing with the systems I have worked on, so I am coming from a different viewpoint than yourself. I would tend to think that just running a full unit test all the way to your database would be the best test. You will be more likely to find the issues with your program if you are testing with an environment as similar to production as possible.
    After running a test you can either purge the data you entered from your test by having sql scripts run against the db, or if this is difficult just reload the database from its original backup. You would probably be able to purge the data quicker than reloading the database from my experience, but it depends on your complexity of the sql scripts.
    best of luck.

  • Best way to schedule MySQL backups.

    Hi All,
    I'm trying to use our Mac mini Server to schedule MySQL backups FROM another server.  The newer MySQL Workbench does not have a way to schedule backups, but I did find AutoMySQLBackup:
    http://sourceforge.net/projects/automysqlbackup/
    Has anyone tried this with success, or is there a better/any other option?  Again, I need to connect to MySQL on another server and backup the database locally - making offsite backups.
    Thanks in advance for your help - Vijay

    RMAN is the only utility that can read RMAN backupsets (which are the default) - forget about export/import for this purpose as they are completely different tools.
    RMAN has some validate functionality built in but the best way to test to actually perform a restore. See the above link for details on that.

Maybe you are looking for

  • Saving for Web

    I was wondering if there was a way to configure Photoshop so that when I create slices and "save to web" the HTML code that generates already includes my domain/directory instead of just starting at "images/x.jpg." This would save me loads of time si

  • Did I have a kernal panic?

    While moving some jpeg files from one folder to another my screen had a kind of screen roll down from the top that darkened it but was transparent. A message came up in a dark box in English & 2 other languages. It said I must force a restart or shut

  • T430 with Intel Ultimate-N 6300 wireless card cannot see 5Ghz network

    I have two machines with the exact same Intel 6300 AGN wireless cards.  Both running Widowns 7 64-bit.  Both have same versions of Intel drivers installed.  The X230 sees and connects to my 5Ghz wireless network.  The T430 sees only the 2.4Ghz networ

  • In finder, in finder, in finder, in finder, in finder, in finder

    in finder when i open it my favorites does not sho how can i show it

  • Lenova Think pad makes 8 beeps and screen wont turn on

    I have a black lenova thinkpad laptop and once in a while when i turn on the laptop, it makes 8 beeping noises and the screen wont turn on at all but it sounds like the laptop is on. I have tried fixing this by keeping the laptop in the fridge for a