Detailed Description
An engine built with a list of property names reads each one by its index in that list, with the native engine and the Lite data file.
Also prints how long a read by name and a read by index take. An engine built with no names takes the names the native code gives after the first load as its list, and reads by index too.
Classes | |
| class | ReadByIndexTests |
Functions | |
| shown (value) | |
| What a caller sees of a value, whether or not it has one. | |
| process (engine) | |
| first_places (names) | |
| Each name in lower case against its first place in the list, which is the index the native code gives. | |
| data_set_names (engine) | |
| The names the data set holds, in the data set's own order. | |
Variables | |
| str | data_file = "../../cxx/data/device-detection/51Degrees-LiteV4.1.hash" |
| tuple | mobile_ua |
| int | TIMED_READS = 20000 |
| int | TIMED_TABLE_BUILDS = 200 |
Function Documentation
◆ data_set_names()
| data_set_names | ( | engine | ) |
The names the data set holds, in the data set's own order.
Only the tests use this order, to build engines whose name lists differ from it.
◆ first_places()
| first_places | ( | names | ) |
Each name in lower case against its first place in the list, which is the index the native code gives.
◆ process()
| process | ( | engine | ) |
◆ shown()
| shown | ( | value | ) |
What a caller sees of a value, whether or not it has one.
Variable Documentation
◆ data_file
| str tests.test_read_by_index.data_file = "../../cxx/data/device-detection/51Degrees-LiteV4.1.hash" |
◆ mobile_ua
| tuple tests.test_read_by_index.mobile_ua |
Initial value:
= ("Mozilla/5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) "
"AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile"
"/11D167 Safari/9537.53")
◆ TIMED_READS
| int tests.test_read_by_index.TIMED_READS = 20000 |
◆ TIMED_TABLE_BUILDS
| int tests.test_read_by_index.TIMED_TABLE_BUILDS = 200 |
