summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
AgeCommit message (Expand)AuthorFilesLines
2017-08-01Bugfix: Build docker image failed because of lacking of packagesxudan1-0/+3
2017-07-19Fix the docker version to be 17.03.0-ce rather than the latest onexudan1-1/+7
2017-06-21bugfix of dockerfileMatthewLi1-0/+2
2017-06-20branch supported in Dockerfile and use functest/yardstick danube.2.0MatthewLi1-8/+4
2017-06-06Fix the docker version to be 1.12.3 in Dovetail docker imagexudan1-1/+1
2017-05-25Change the directories of results and some files to DOVETAIL_HOMExudan1-2/+0
2017-05-03local db support offline modeLeo Wang1-0/+5
2017-05-01Tips on update docker to right version, > 1.8grkiss1-1/+4
2017-04-16fix click and pytz package versionMatthewLi1-2/+0
2017-03-23bugfix of package errorMatthewLi1-1/+6
2017-02-20dovetail tool: bugfix for dovetail report and docker buildMatthewLi1-3/+1
2017-01-17dovetail tool: change to git repo then pbr.version can be get inside dockerMatthewLi1-1/+1
2017-01-16dovetail tool: bugfix for pip installMatthewLi1-1/+2
2017-01-16Update Dockerfilewu.zhihui1-7/+5
2017-01-13dovetail tool: command lineMatthewLi1-2/+7
2017-01-08dovetail tool: bugfix of pbr installation in requirements.txt and DockerfileMatthewLi1-1/+2
2016-12-13dovetail tool: fix docker version of client mismatches with server in Docker ...MatthewLi1-7/+1
2016-11-30bugfix: Add BRANCH Argument in the DockerfileMatthewLi1-2/+4
2016-10-12preparation for setup.pyMatthewLi1-2/+2
2016-09-30Use template to unify commands in functest/yardstickLeo Wang1-13/+26
2016-09-20change workdir of docker container for ciLeo Wang1-1/+3
2016-09-19add dockerfile of dovetail toolLeo Wang1-0/+22
an class="p">(const Timestamp &now, const Timestamp &maxDiff) const { return now - Timestamp(tv) > maxDiff; } K key; T value; struct timeval tv; /* List time entry has been hit */ list<struct entry> *parent; }; class Iterator { friend class FlowTable; public: bool operator!=(const Iterator& other) { return m_v != other.m_v || m_vec_pos != other.m_vec_pos || m_a != other.m_a; } Iterator& operator++() { m_a++; while (m_vec_pos != m_v->size() - 1 && m_a == (*m_v)[m_vec_pos].end()) { m_vec_pos++; m_a = (*m_v)[m_vec_pos].begin(); } return *this; } struct entry &operator*() { return *m_a; } private: Iterator(uint32_t vec_pos, vector<list<struct entry> > *v) : m_vec_pos(vec_pos), m_v(v) { m_a = (*m_v)[vec_pos].begin(); while (m_vec_pos != m_v->size() - 1 && m_a == (*m_v)[m_vec_pos].end()) { m_vec_pos++; m_a = (*m_v)[m_vec_pos].begin(); } } Iterator(uint32_t vec_pos, vector<list<struct entry> > *v, const typename list< struct entry>::iterator& a) : m_vec_pos(vec_pos), m_v(v), m_a(a) { } uint32_t m_vec_pos; vector<list<struct entry> > *m_v; typename list<struct entry>::iterator m_a; }; uint32_t getEntryCount() const {return m_entryCount;} FlowTable(uint32_t size); void expire(const struct timeval& tv); struct entry* lookup(const K& key); void remove(struct FlowTable<K,T>::entry* entry); struct entry* insert(const K& key, const T& value, const struct timeval& tv); Iterator begin() {return Iterator(0, &m_elems);} Iterator end() {return Iterator(m_elems.size() - 1, &m_elems, m_elems.back().end());} void clear(); private: void clearBucket(list<struct entry> *l); vector<list<struct entry> > m_elems; uint32_t m_entryCount; }; template <typename K, typename T> FlowTable<K, T>::FlowTable(uint32_t size) : m_elems(), m_entryCount(0) { m_elems.resize(size); } template <typename K, typename T> struct FlowTable<K, T>::entry* FlowTable<K, T>::lookup(const K& key) { uint32_t ret = crc32((uint8_t*)&key, sizeof(K), 0); list<struct entry> &l = m_elems[ret % m_elems.size()]; if (l.empty()) return NULL; for (typename list<struct entry>::iterator it = l.begin(); it != l.end(); ++it) { if (memcmp(&((*it).key), &key, sizeof(key)) == 0) return &(*it); } return NULL; } template <typename K, typename T> struct FlowTable<K, T>::entry *FlowTable<K, T>::insert(const K& key, const T& value, const struct timeval& tv) { uint32_t ret = crc32((uint8_t*)&key, sizeof(K), 0); list<struct entry> &l = m_elems[ret % m_elems.size()]; l.push_back(entry(key, value, tv, &l)); struct entry &n = l.back(); m_entryCount++; n.key = key; n.value = value; return &n; } template <typename K, typename T> void FlowTable<K, T>::remove(struct FlowTable<K,T>::entry* entry) { list<struct entry> &l = *entry->parent; for (typename list<struct entry>::iterator it = l.begin(); it != l.end(); ++it) { if (memcmp(&((*it).key), &entry->key, sizeof(entry->key)) == 0) { l.erase(it); m_entryCount--; return ; } } } template <typename K, typename T> void FlowTable<K, T>::clearBucket(list<struct entry> *l) { while (!l->empty()) { m_entryCount--; l->erase(l->begin()); } } template <typename K, typename T> void FlowTable<K, T>::clear() { for (size_t i = 0; i < m_elems.size(); ++i) { clearBucket(&m_elems[i]); } } #endif /* _FLOWTABLE_H_ */