Пример #1
0
end_time=util.input_with_default('End date and time (DD-MON-YYYY HH24:MI:SS)','01-JAN-2200 12:00:00')

instance_number=util.input_with_default('Database Instance (1 if not RAC)','1')

queryobj = signatures.groupofsignatures()

queryobj.set_start_end_instance(start_time,end_time,instance_number)

lines = util.read_config_file(util.config_dir,database+util.groupsigs_file)

for line in lines:
    if len(line) > 0:
        queryobj.add_signature(int(line))

querytext = queryobj.build_query()

results = dbconnection.run_return_flipped_results(querytext)

util.exit_no_results(results)

# plot query
    
myplot.title = "SQL matching group of signatures on "+database+" database, instance "+instance_number+" elapsed versus executions"
myplot.ylabel1 = "Number of executions"
myplot.ylabel2 = "Averaged Elapsed Microseconds"

myplot.xdatetimes = results[0]
myplot.ylists = results[1:]

myplot.line_2subplots()
Пример #2
0
    util.input_with_default('minimum number of waits per hour', '0'))

start_time = util.input_with_default(
    'Start date and time (DD-MON-YYYY HH24:MI:SS)', '01-JAN-1900 12:00:00')

end_time = util.input_with_default(
    'End date and time (DD-MON-YYYY HH24:MI:SS)', '01-JAN-2200 12:00:00')

instance_number = util.input_with_default('Database Instance (1 if not RAC)',
                                          '1')

# Build and run query

q = onewait(wait_event, min_waits, start_time, end_time, instance_number)

r = dbconnection.run_return_flipped_results(q)

util.exit_no_results(r)

# plot query

myplot.title = "'" + wait_event + "' waits on " + database + " database, instance " + instance_number + ", minimum waits=" + str(
    min_waits)
myplot.ylabel1 = "Number of events"
myplot.ylabel2 = "Averaged Elapsed Microseconds"

myplot.xdatetimes = r[0]
myplot.ylists = r[1:]

myplot.line_2subplots()