am 0005b354: Merge "bionic: change properties benchmarks to read a single property"
* commit '0005b3544be345e697592b4dc199ebaa37048559': bionic: change properties benchmarks to read a single property
This commit is contained in:
commit
1a38e06383
@ -87,12 +87,12 @@ static void BM_property_get(int iters, int nprops)
|
||||
LocalPropertyTestState pa(nprops);
|
||||
char value[PROP_VALUE_MAX];
|
||||
|
||||
srandom(iters * nprops);
|
||||
|
||||
StartBenchmarkTiming();
|
||||
|
||||
for (int i = 0; i < iters; i++) {
|
||||
for (int j = 0; j < nprops; j++) {
|
||||
__system_property_get(pa.names[j], value);
|
||||
}
|
||||
__system_property_get(pa.names[random() % nprops], value);
|
||||
}
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
@ -104,12 +104,12 @@ static void BM_property_find(int iters, int nprops)
|
||||
|
||||
LocalPropertyTestState pa(nprops);
|
||||
|
||||
srandom(iters * nprops);
|
||||
|
||||
StartBenchmarkTiming();
|
||||
|
||||
for (int i = 0; i < iters; i++) {
|
||||
for (int j = 0; j < nprops; j++) {
|
||||
__system_property_find(pa.names[j]);
|
||||
}
|
||||
__system_property_find(pa.names[random() % nprops]);
|
||||
}
|
||||
StopBenchmarkTiming();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user