Coverage for src/lib.mys : 75%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1func exit(code: i32):
2 c"std::exit(code);"
4class Statistics:
5 """Various application statistics.
7 """
9 number_of_allocated_objects: u64
10 number_of_object_decrements: u64
11 number_of_object_frees: u64
13func statistics() -> Statistics:
14 """Various statistics about the application.
16 """
18 number_of_allocated_objects: u64 = 0
19 number_of_object_decrements: u64 = 0
20 number_of_object_frees: u64 = 0
22 c"""
23 #ifdef MYS_MEMORY_STATISTICS
24 number_of_allocated_objects = mys::number_of_allocated_objects;
25 number_of_object_decrements = mys::number_of_object_decrements;
26 number_of_object_frees = mys::number_of_object_frees;
27 #endif
28 """
30 return Statistics(number_of_allocated_objects,
31 number_of_object_decrements,
32 number_of_object_frees)
34test statistics():
35 print(statistics())