This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

About JSON output generated by "bench-malloc-thread"


Hi,
I was curious to run some benchmarks for different allocators and I found
out the benchtests/bench-malloc-thread utility.
However apparently it's producing a JSON output that is not following the
"benchout.schema.json" schema presnt under benchtests/scripts. Is this a
known/desired behavior?
(this is on latest git master branch)

How am I supposed to graph the results of that benchmark utility?

This is what I get calling "compare_bench.py":

-----
./compare_bench.py benchout.schema.json
../../mybuild/benchtests/bench-malloc-thread-1.out
../../mybuild/benchtests/bench-malloc-thread-8.out
Traceback (most recent call last):
  File "./compare_bench.py", line 184, in <module>
    main(sys.argv[1:])
  File "./compare_bench.py", line 164, in main
    bench1 = bench.parse_bench(args[1], args[0])
  File "/home/francesco/work/glibc/benchtests/scripts/import_bench.py",
line 138, in parse_bench
    validator.validate(bench, schema)
  File "/usr/lib/python2.7/dist-packages/jsonschema/validators.py", line
478, in validate
    cls(schema, *args, **kwargs).validate(instance)
  File "/usr/lib/python2.7/dist-packages/jsonschema/validators.py", line
123, in validate
    raise error
jsonschema.exceptions.ValidationError: Additional properties are not
allowed (u'time_per_iteration', u'random_seed', u'min_size', u'threads',
u'max_rss', u'max_size' were unexpected)

Failed validating u'additionalProperties' in
schema[u'properties'][u'functions'][u'patternProperties'][u'^[_a-zA-Z][_a-zA-Z0-9]+$'][u'patternProperties'][u'^[_a-zA-Z0-9,=.-]*$']:
    {u'additionalProperties': False,
     u'properties': {u'duration': {u'type': u'number'},
                     u'iterations': {u'type': u'number'},
                     u'max': {u'type': u'number'},
                     u'mean': {u'type': u'number'},
                     u'min': {u'type': u'number'},
                     u'throughput': {u'type': u'number'},
                     u'timings': {u'items': {u'type': u'number'},
                                  u'type': u'array'}},
     u'required': [u'duration', u'iterations'],
     u'title': u'Function variants',
     u'type': u'object'}

On instance[u'functions'][u'malloc'][u'']:
    {u'duration': 191891000000.0,
     u'iterations': 3531640000.0,
     u'max_rss': 1792,
     u'max_size': 32768,
     u'min_size': 4,
     u'random_seed': 88,
     u'threads': 1,
     u'time_per_iteration': 54.3348}
-----

Thanks,
Francesco M.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]