public List<List<String>> getAllQueries() {
        List<List<String>> result = Lists.newLinkedList();
        readLock.lock();
        try {
            for (ProfileElement element : profileMap.values()) {
                Map<String, String> infoStrings = element.infoStrings;
                List<String> row = Lists.newArrayList();
                for (String str : PROFILE_HEADERS) {
                    row.add(infoStrings.get(str));
                }
                result.add(0, row);
            }
            for (ProfileElement element : loadProfileMap.values()) {
                Map<String, String> infoStrings = element.infoStrings;
                List<String> row = Lists.newArrayList();
                for (String str : PROFILE_HEADERS) {
                    row.add(infoStrings.get(str));
                }
                result.add(0, row);
            }
        } finally {
            readLock.unlock();
        }
        return result;
    }
@Test
    public void testGetAllQueries() {
        ProfileManager manager = ProfileManager.getInstance();
        assertTrue(manager.getAllProfileElements().isEmpty());

        RuntimeProfile profile1 = buildRuntimeProfile("123", "Query");
        manager.pushProfile(null, profile1);

        RuntimeProfile profile2 = buildRuntimeProfile("124", "Load");
        manager.pushProfile(null, profile2);

        assertEquals(2, manager.getAllQueries().size());

        manager.clearProfiles();
    }