aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/find_time_trace.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
committeralexv-smirnov <alex@ydb.tech>2023-06-13 11:05:01 +0300
commitbf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0 (patch)
tree1d1df72c0541a59a81439842f46d95396d3e7189 /build/scripts/find_time_trace.py
parent8bfdfa9a9bd19bddbc58d888e180fbd1218681be (diff)
downloadydb-bf0f13dd39ee3e65092ba3572bb5b1fcd125dcd0.tar.gz
add ymake export to ydb
Diffstat (limited to 'build/scripts/find_time_trace.py')
-rw-r--r--build/scripts/find_time_trace.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/build/scripts/find_time_trace.py b/build/scripts/find_time_trace.py
new file mode 100644
index 0000000000..954d203caa
--- /dev/null
+++ b/build/scripts/find_time_trace.py
@@ -0,0 +1,17 @@
+import os
+import sys
+
+# /scripts/find_time_trace.py <object_file> <destination>
+# clang generates `-ftime-trace` output file path based on main output file path
+
+
+def main():
+ assert len(sys.argv) == 3
+ obj_path = sys.argv[1]
+ trace_path = sys.argv[2]
+ orig_trace_path = obj_path.rpartition('.o')[0] + '.json'
+ os.rename(orig_trace_path, trace_path)
+
+
+if __name__ == '__main__':
+ main()