Changeset 9 for trunk/bin/sampler


Ignore:
Timestamp:
07/10/15 14:03:04 (9 years ago)
Author:
tim
Message:

.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/sampler

    r5 r9  
    3737                    help='JSON representation of echo timing cases.')
    3838parser.add_argument('--no-tcpts', action='store_true', help='Disbale TCP timestamp profiling')
     39parser.add_argument('--no-control', action='store_true', help='Do not collect separate control data.  Instead, synthesize it from test and train data.')
    3940parser.add_argument('session_name', default=None,
    4041                    help='Name for the sampler session (used in output filenames)')
     
    133134time.sleep(0.5) # ensure sniffer is fully ready and our process is migrated
    134135
     136if options.no_control:
     137    num_control = 0
     138else:
     139    num_control = int(num_samples*2/5)
     140
     141num_train = int((num_samples-num_control)/3)
     142num_test = num_samples-num_train-num_control
     143
     144sample_types = [('train',num_train),
     145                ('train_null',num_control),
     146                ('test',num_test)]
     147
    135148sid = 0
    136 sample_types = [('train',int(num_samples*1/5)),
    137                 ('train_null',int(num_samples*2/5)),
    138                 ('test',int(num_samples*2/5)),
    139                 ('test_null',0)]
    140149report_interval = 20
    141150start = time.time()
     
    183192print("associate time:", end-start)
    184193
     194if options.no_control:
     195    print("TODO: implement control synthesizing!")
     196
    185197start = time.time()
    186198num_probes = analyzeProbes(db)
Note: See TracChangeset for help on using the changeset viewer.