|
|
|
@ -230,13 +230,11 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: |
|
|
|
|
print >> H, "#ifndef GRPC_CORE_LIB_DEBUG_STATS_DATA_H" |
|
|
|
|
print >> H, "#define GRPC_CORE_LIB_DEBUG_STATS_DATA_H" |
|
|
|
|
print >> H |
|
|
|
|
print >> H, "#include <grpc/support/port_platform.h>" |
|
|
|
|
print >> H |
|
|
|
|
print >> H, "#include <inttypes.h>" |
|
|
|
|
print >> H, "#include \"src/core/lib/iomgr/exec_ctx.h\"" |
|
|
|
|
print >> H |
|
|
|
|
print >> H, "#ifdef __cplusplus" |
|
|
|
|
print >> H, "extern \"C\" {" |
|
|
|
|
print >> H, "#endif" |
|
|
|
|
print >> H |
|
|
|
|
|
|
|
|
|
for typename, instances in sorted(inst_map.items()): |
|
|
|
|
print >> H, "typedef enum {" |
|
|
|
@ -289,10 +287,6 @@ with open('src/core/lib/debug/stats_data.h', 'w') as H: |
|
|
|
|
print >> H, "extern void (*const grpc_stats_inc_histogram[%d])(int x);" % len( |
|
|
|
|
inst_map['Histogram']) |
|
|
|
|
|
|
|
|
|
print >> H |
|
|
|
|
print >> H, "#ifdef __cplusplus" |
|
|
|
|
print >> H, "}" |
|
|
|
|
print >> H, "#endif" |
|
|
|
|
print >> H |
|
|
|
|
print >> H, "#endif /* GRPC_CORE_LIB_DEBUG_STATS_DATA_H */" |
|
|
|
|
|
|
|
|
@ -316,10 +310,13 @@ with open('src/core/lib/debug/stats_data.cc', 'w') as C: |
|
|
|
|
[C], |
|
|
|
|
["Automatically generated by tools/codegen/core/gen_stats_data.py"]) |
|
|
|
|
|
|
|
|
|
print >> C, "#include \"src/core/lib/debug/stats_data.h\"" |
|
|
|
|
print >> C, "#include <grpc/support/port_platform.h>" |
|
|
|
|
print >> C |
|
|
|
|
print >> C, "#include \"src/core/lib/debug/stats.h\"" |
|
|
|
|
print >> C, "#include \"src/core/lib/debug/stats_data.h\"" |
|
|
|
|
print >> C, "#include \"src/core/lib/gpr/useful.h\"" |
|
|
|
|
print >> C, "#include \"src/core/lib/iomgr/exec_ctx.h\"" |
|
|
|
|
print >> C, "#include <grpc/support/useful.h>" |
|
|
|
|
print >> C |
|
|
|
|
|
|
|
|
|
histo_code = [] |
|
|
|
|
for histogram in inst_map['Histogram']: |
|
|
|
|