3
# Benchmark of Axiom Item in-memory attribute modification. Accepts no
4
# parameters. Reports one statistic, the number of seconds it takes to
5
# change the value of an in-memory attribute.
10
from axiom.store import Store
11
from axiom.attributes import inmemory, text
18
# Include text attribute because at least one persistent attribute is required.
19
SomeItem = benchlib.itemTypeWithSomeAttributes([inmemory] * numAttributes + [text])
21
counter = range(10000)
25
items.append(SomeItem(store=store))
36
return (after - before) / (len(counter) * numAttributes)
41
raise SystemExit("Usage: %s <number of attributes>")
45
if __name__ == '__main__':