Qt Test limitations and workarounds

Pros and cons

Why use Qt Test for unit testing and TDD (test-driven development)?

  • small testing framework (about 6K lines of source code);
  • seamless integration with QtCreator development environment;
  • full support of Qt framework including classes/types and signal/slots;
  • simple to start and use.

However, there are some drawbacks, too.

SQL Server: key-value store table and hash index

Hash indexes are used as entry points for memory-optimized tables; both features were introduced in SQL Server 2014. Let's look at index performance in scenario "key-value store".

Scenario and environment

The table stores a significant volume (about 10 millions rows) of pairs key-value. The key is of integer type and the value is a small random string.

The table store is used :

  • random read of a value from a key
  • random update of a value by a key

We will tests the scenario for the following types of table :

Sorted map vs hashed map

In theory, hash map structure should be very fast on retrieving by key operations, close to O(1) like for an array. A sorted map (keys are sorted) should be O(log2 N) instead. The following test checks the difference.

Common scenario

We will use one tester class per type of tested structure. The keys are string[10] and are generated randomly in prepared array to avoid additional checks whether the key exists or not.


Subscribe to RSS - Testing