10 sys.exit(
"Invalid arguments: usage: python libsize.py file.so save.txt")
15 if not os.path.exists(lib):
16 sys.exit(f
"Error: requested file ({lib}) does not exist")
18 libsize = os.path.getsize(lib)
20 print(
"------", os.path.basename(lib),
"file size:", libsize, end=
"")
22 if os.path.exists(save):
23 with open(save)
as sf:
24 oldsize =
int(sf.readline())
27 change = libsize - oldsize
31 print(f
" (change of {change:+} bytes = {change / oldsize:+.2%})")
35 with open(save,
"w")
as sf:
36 sf.write(
str(libsize))
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
size_t len(handle h)
Get the length of a Python object.