summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-05-07 12:18:37 +0200
committerDaniel Friesel <daniel.friesel@uos.de>2019-05-07 12:18:37 +0200
commitfc1368b3421171467d5925537b271091215f74f4 (patch)
treeffaeeb2dbc712e8667c693ec6c85d3c80246d9da /lib
parentbc6e052665a1d6fdd93f5f654d14dc225149c309 (diff)
Protolog: Handle codegen failure
Diffstat (limited to 'lib')
-rw-r--r--lib/data_parameters.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/data_parameters.py b/lib/data_parameters.py
index fd78079..4dde850 100644
--- a/lib/data_parameters.py
+++ b/lib/data_parameters.py
@@ -204,10 +204,14 @@ class Protolog:
arch_lib, benchmark, benchmark_item, aggregate_label,
subv[data_label]['v'], str(e)))
pass
- codegen = codegen_for_lib(lib, libopts.split(','), subv['data'])
- if codegen.max_serialized_bytes != None:
- self.add_datapoint(arch, library, (benchmark, benchmark_item), subv, 'buffer_size', data_label, lambda x: codegen.max_serialized_bytes)
- else:
+ try:
+ codegen = codegen_for_lib(lib, libopts.split(','), subv['data'])
+ if codegen.max_serialized_bytes != None:
+ self.add_datapoint(arch, library, (benchmark, benchmark_item), subv, 'buffer_size', data_label, lambda x: codegen.max_serialized_bytes)
+ else:
+ self.add_datapoint(arch, library, (benchmark, benchmark_item), subv, 'buffer_size', data_label, lambda x: 0)
+ except:
+ # avro's codegen will raise RuntimeError("Unsupported Schema") on unsupported data. Other libraries may just silently ignore it.
self.add_datapoint(arch, library, (benchmark, benchmark_item), subv, 'buffer_size', data_label, lambda x: 0)
#self.aggregate[(benchmark, benchmark_item)][arch][lib][aggregate_label] = getter(value[data_label]['v'])