I was benchmarking the populate utils when I noticed something strange. Consider this simple benchmarking method:
ClassMethod runBench(count As %Integer = 300000)
{
s types=["name","ssn","company","title","phone","city","street","zip","mission","state","color","product","string","integer","float"]
//s types=["name","ssn"]
s iter=types.%GetIterator()
while iter.%GetNext(.key,.value){
s start=$P($ZTS,",",2)
s opt={}
s opt.type=value
for i=1:1:count{
s res=##class(DataGen.Generator).genVal(opt) }
s end=$P($ZTS,",",2)
s total=end-start
w value_$C(9)_" total time:"_total_$C(9)_" rate: "_$NORMALIZE(count/total,2)_" per second",!
}
}
