Tidy a few things up.
authorCarl Hetherington <carl@carlh.net>
Mon, 23 Jan 2012 16:03:08 +0000 (16:03 +0000)
committerCarl Hetherington <carl@carlh.net>
Mon, 23 Jan 2012 16:03:08 +0000 (16:03 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@11311 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/run-profiling.sh
libs/ardour/test/profiling/runpc.cc

index e88ca2cf8622442d4cb7cadf7625edcda59e275e..3f2148fbed81dc97a92141000ffe7a7717ce4c15 100644 (file)
@@ -18,13 +18,14 @@ export LD_LIBRARY_PATH=$libs/audiographer:$libs/vamp-sdk:$libs/surfaces:$libs/su
 export ARDOUR_PANNER_PATH=$libs/panners/2in2out:$libs/panners/1in2out:$libs/panners/vbap
 
 export LD_PRELOAD=/home/carl/src/libfakejack/libjack.so
+session='32tracks'
 
 if [ "$1" == "--debug" ]; then
-        gdb ./libs/ardour/run-profiling
+        gdb --args ./libs/ardour/run-profiling $session
 elif [ "$1" == "--valgrind" ]; then
-        valgrind ./libs/ardour/run-profiling
+        valgrind ./libs/ardour/run-profiling $session
 elif [ "$1" == "--callgrind" ]; then
-        valgrind --tool=callgrind ./libs/ardour/run-profiling
+        valgrind --tool=callgrind ./libs/ardour/run-profiling $session
 else
-        ./libs/ardour/run-profiling $*
+        ./libs/ardour/run-profiling $session
 fi
index 4b6f75c629f816f0ec1fc5863beae4d15857d8a8..90f9136e231dd08b715a07e29d5bfa79d7d34486 100644 (file)
@@ -49,10 +49,15 @@ protected:
 TestReceiver test_receiver;
 
 int
-main ()
+main (int argc, char* argv[])
 {
-       string const test_session_path = "../libs/ardour/test/profiling/sessions/0tracks";
-       string const test_session_snapshot = "0tracks.ardour";
+       if (argc < 2) {
+               cerr << argv[0] << ": <session>\n";
+               exit (EXIT_FAILURE);
+       }
+       
+       string const test_session_path = string_compose ("../libs/ardour/test/profiling/sessions/%1", argv[1]);
+       string const test_session_snapshot = string_compose ("%1.ardour", argv[1]);
        
        init (false, true);
        SessionEvent::create_per_thread_pool ("test", 512);
@@ -69,6 +74,8 @@ main ()
        Session* session = new Session (*engine, test_session_path, test_session_snapshot);
        engine->set_session (session);
 
+       cout << "INFO: " << session->get_routes()->size() << " routes.\n";
+
        for (int i = 0; i < 32768; ++i) {
                session->process (64);
        }