Index: trunk/bin/analyze
===================================================================
--- trunk/bin/analyze	(revision 4)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#!/usr/bin/env python3
-#-*- mode: Python;-*-
-
-import sys
-import os
-import time
-import random
-import tempfile
-import argparse
-import socket
-import json
-try:
-    import requests
-except:
-    sys.stderr.write('ERROR: Could not import requests module.  Ensure it is installed.\n')
-    sys.stderr.write('       Under Debian, the package name is "python3-requests"\n.')
-    sys.exit(1)
-
-VERSION = "{DEVELOPMENT}"
-if VERSION == "{DEVELOPMENT}":
-    script_dir = '.'
-    try:
-        script_dir = os.path.dirname(os.path.realpath(__file__))
-    except:
-        try:
-            script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
-        except:
-            pass
-    sys.path.append("%s/../lib" % script_dir)
-
-from nanownlib import *
-import nanownlib.storage
-
-
-parser = argparse.ArgumentParser(
-    description="")
-parser.add_argument('db_file', default=None,
-                    help='')
-options = parser.parse_args()
-
-
-
-db = nanownlib.storage.db(options.db_file)
-
-start = time.time()
-num_probes = analyzeProbes(db)
-end = time.time()
-print("analyzed %d probes' packets in: %f" % (num_probes, end-start))
Index: trunk/bin/analyze_packets
===================================================================
--- trunk/bin/analyze_packets	(revision 5)
+++ trunk/bin/analyze_packets	(revision 5)
@@ -0,0 +1,48 @@
+#!/usr/bin/env python3
+#-*- mode: Python;-*-
+
+import sys
+import os
+import time
+import random
+import tempfile
+import argparse
+import socket
+import json
+try:
+    import requests
+except:
+    sys.stderr.write('ERROR: Could not import requests module.  Ensure it is installed.\n')
+    sys.stderr.write('       Under Debian, the package name is "python3-requests"\n.')
+    sys.exit(1)
+
+VERSION = "{DEVELOPMENT}"
+if VERSION == "{DEVELOPMENT}":
+    script_dir = '.'
+    try:
+        script_dir = os.path.dirname(os.path.realpath(__file__))
+    except:
+        try:
+            script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
+        except:
+            pass
+    sys.path.append("%s/../lib" % script_dir)
+
+from nanownlib import *
+import nanownlib.storage
+
+
+parser = argparse.ArgumentParser(
+    description="")
+parser.add_argument('db_file', default=None,
+                    help='')
+options = parser.parse_args()
+
+
+
+db = nanownlib.storage.db(options.db_file)
+
+start = time.time()
+num_probes = analyzeProbes(db)
+end = time.time()
+print("analyzed %d probes' packets in: %f" % (num_probes, end-start))
Index: trunk/bin/sampler
===================================================================
--- trunk/bin/sampler	(revision 4)
+++ trunk/bin/sampler	(revision 5)
@@ -36,5 +36,5 @@
 parser.add_argument('-c', dest='cases', type=str, default='{"short":10000,"long":13000}',
                     help='JSON representation of echo timing cases.')
-parser.add_argument('--tcpts', action='store_true', help='Enable TCP timestamp profiling')
+parser.add_argument('--no-tcpts', action='store_true', help='Disbale TCP timestamp profiling')
 parser.add_argument('session_name', default=None,
                     help='Name for the sampler session (used in output filenames)')
@@ -100,5 +100,5 @@
 
 meta = {'tcpts_mean':None,'tcpts_stddev':None,'tcpts_slopes':None}
-if options.tcpts:
+if not options.no_tcpts:
     sys.stderr.write("INFO: Probing target for TCP timestamp precision...\n")
     sniffer_fp = tempfile.NamedTemporaryFile('w+t')
@@ -134,7 +134,7 @@
 
 sid = 0
-sample_types = [('train',int(num_samples*2/7)),
-                ('train_null',int(num_samples*3/7)+1),
-                ('test',int(num_samples*2/7)),
+sample_types = [('train',int(num_samples*1/5)),
+                ('train_null',int(num_samples*2/5)),
+                ('test',int(num_samples*2/5)),
                 ('test_null',0)]
 report_interval = 20
Index: trunk/lib/nanownlib/__init__.py
===================================================================
--- trunk/lib/nanownlib/__init__.py	(revision 4)
+++ trunk/lib/nanownlib/__init__.py	(revision 5)
@@ -379,4 +379,7 @@
         pcursor.execute("INSERT INTO analysis SELECT id,probe_id,suspect,packet_rtt,tsval_rtt FROM trim_analysis WHERE sent_trimmed=? AND rcvd_trimmed=?",
                         (best_strim,best_rtrim))
+
+    #pcursor.execute("DELETE FROM trim_analysis")
+    db.conn.commit()
     
     return count
