fixed json dependencies
This commit is contained in:
+5
-5
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/python
|
||||
from sqlitedb import SQLiteDB
|
||||
|
||||
def post_process_data(db, table_name, start_ns, outfile = ''):
|
||||
def post_process_data(db, table_name, outfile = ''):
|
||||
# db.add_data_column('A', 'DispDurNs', 'INTEGER', 'BeginNs - DispatchNs')
|
||||
# db.add_data_column('A', 'ComplDurNs', 'INTEGER', 'CompleteNs - EndNs')
|
||||
# db.add_data_column('A', 'TotalDurNs', 'INTEGER', 'CompleteNs - DispatchNs')
|
||||
@@ -19,13 +19,13 @@ def gen_table_bins(db, table, outfile, name_var, dur_ns_var):
|
||||
gen_data_bins(db, outfile)
|
||||
db.execute('DROP VIEW B')
|
||||
|
||||
def gen_api_json_trace(db, table, start_ns, outfile):
|
||||
db.execute('create view B as select "Index", Name as name, pid, tid, (BeginNs/1000 - %d/1000) as ts, (DurationNs/1000) as dur from %s order by ts asc;' % (start_ns, table));
|
||||
def gen_api_json_trace(db, table, start_us, outfile):
|
||||
db.execute('create view B as select "Index", Name as name, pid, tid, (BeginNs/1000 - %d) as ts, (DurationNs/1000) as dur from %s order by ts asc;' % (start_us, table));
|
||||
db.dump_json('B', table, outfile)
|
||||
db.execute('DROP VIEW B')
|
||||
|
||||
def gen_kernel_json_trace(db, table, base_pid, start_ns, outfile):
|
||||
db.execute('create view B as select "Index", KernelName as name, ("gpu-id" + %d) as pid, (0) as tid, (BeginNs/1000 - %d/1000) as ts, (DurationNs/1000) as dur from %s order by ts asc;' % (base_pid, start_ns, table));
|
||||
def gen_kernel_json_trace(db, table, base_pid, start_us, outfile):
|
||||
db.execute('create view B as select "Index", KernelName as name, ("gpu-id" + %d) as pid, (0) as tid, (BeginNs/1000 - %d) as ts, (DurationNs/1000) as dur from %s order by ts asc;' % (base_pid, start_us, table));
|
||||
db.dump_json('B', table, outfile)
|
||||
db.execute('DROP VIEW B')
|
||||
##############################################################################################
|
||||
|
||||
Reference in New Issue
Block a user