• About Us
  • Blog
  • Basket
  • Account
  • Sign In
  •  

Performance Evaluation

2 performance tests are included with the C library for single and multi-threaded evaluation. Single threaded performance evaluation will work on any platform, multi-threaded has been written exclusively for Windows.

Single Threaded - All Platforms

The build process described in the Quick Start section also produced 2 additional executable called PerfPat and PerfTrie. Each uses the pattern and trie detection methods respectively. They both read an input file of user agents, detect the corresponding devices and then finally return an average detection time.

PerfPat

Runs a performance test using a single process and thread using a data file of user agent strings as input. Uses the pattern matching detection routine which is very memory efficient.

PerfPat.exe UserAgentsFile [Properties]

UserAgentsFile

Path to a list of user agents to be used in the performance test.

http://51Degrees.com/Million.zip contains a test file of one million user agents.

[Properties]

A comma separated list of properties to be returned. If not provided Id will be used.

For example: Id,IsMobile will return the Id of the matched device and True or False to indicate if the device is a mobile.

Examples: PerfPat.exe million.csv
PerfPat.exe million.csv Id,IsMobile

PerfTrie

Runs a performance test using a single process and thread using a data file of user agent strings as input. Uses the trie matching detection routine which is very fast, but uses a lot of memory.

PerfTrie.exe TrieDataFile UserAgentsFile [Properties]

TrieDataFile

A source data file in trie format. See the readme.txt file in the data folder for more details.

UserAgentsFile

Path to a list of user agents to be used in the performance test.

http://51Degrees.com/Million.zip contains a test file of one million user agents.

[Properties]

A comma separated list of properties to be returned. If not provided Id will be used.

For example: Id,IsMobile will return the Id of the matched device and True or False to indicate if the device is a mobile.

Examples: PerfTrie.exe 51Degrees.com.trie.dat million.csv
PerfTrie.exe 51Degrees.com.trie.dat million.csv Id,IsMobile

The following screen shot demonstrates the results for PerfTrie.

Multi Threaded - Trie & Windows

A C++ windows project is included to launch a multi-threaded version of the performance evaluation using the trie method only. The executable uses the same command line arguments as those used with PerfTrie.

Start by opening the FiftyOne.Mobile.Detection.Performance.sln solution from within the windows folder. Ensure the Command Arguments are configured to provide the correct path to the Trie data file, and the data file containing the test user agents. The following screen shows the correct configuration for files located in the data folder of the project.

Need Help?