Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions preciceprofiling/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ def createProfilingDB(con: sqlite3.Connection) -> sqlite3.Cursor:
return cur


def createIndices(con: sqlite3.Connection):
con.execute("CREATE INDEX identity ON events (pid, rank)")
con.execute("CREATE INDEX tsorder ON events (ts ASC)")


@cache
def addOrFetchParticipant(cur: sqlite3.Cursor, name: str, size: int):
cur.execute(
Expand Down Expand Up @@ -471,6 +476,7 @@ def mergeCommand(files, outfile, align):

# commit and tidy up
con.commit()
createIndices(con)
con.execute("VACUUM")
con.close()

Expand Down