Changeset 3545


Ignore:
Timestamp:
Oct 29, 2013, 9:08:08 PM (5 years ago)
Author:
shiyangy
Message:

script updated

Location:
proto/xmlschema
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • proto/xmlschema/src/perf.py

    r3543 r3545  
    1111#n1 is the total byte of the file
    1212#n2 is the number of bytes of the doublelist data
    13 n1,n2 = shiporder_gen.gen(10000,11100,10,12)
     13n1,n2 = shiporder_gen.gen(10000,11100,10,12,21,23)
    1414
    1515perfin = open("perflog.txt",'r')
     
    107107        p.wait()
    108108        cy,ins = read_log("perflog.txt")
    109         perfout.write('content model without validation, just gathering')
     109        perfout.write('content model without validation, just gathering\n')
    110110        print_st(perfout,cy,ins)
    111111       
     
    116116execute(execution1,10)
    117117
     118element_in = open('element.out','r')
     119ls_ele = []
     120for line in element_in:
     121        ls_ele.append(int(line))
     122ls_id = [2,4,9]
     123total_ele = 0
     124total_val = 0
     125for i in range(len(ls_ele)):
     126        total_ele += ls_ele[i]
     127        if i in ls_id:
     128                total_val += ls_ele[i]
     129perfout.write('total number of element:'+str(total_ele)+'\n')
     130perfout.write('total number of element validated:'+str(total_val)+'\n')
     131perfout.write('element validated percetage:'+str(float(total_val)/total_ele)+'\n')
    118132
    119133
  • proto/xmlschema/src/shiporder_gen.py

    r3541 r3545  
    99        return price
    1010
    11 def gen(n1,n2,d1,d2):
     11def gen(n1,n2,d1,d2,i1,i2):
    1212
    1313        name_lst = ['Bruna Gullett','Terrence Stearns', 'Perry Sensabaugh',
     
    135135                fout.write(s)
    136136       
    137                 number_item = random.randint(1,10)
     137                number_item = random.randint(i1,i2)
    138138                for j in range(number_item):
    139139                        s = '\t<item>\n'
  • proto/xmlschema/validation_template_onevec_shiporder.cpp

    r3544 r3545  
    2222#define VECTOR_TYPE (char)
    2323
    24 #define DEBUG 1
     24//#define DEBUG 1
    2525
    2626//#define DATATYPE 1
Note: See TracChangeset for help on using the changeset viewer.