issue#11: cds: changed __CDS_ guard prefix to CDSLIB_ for all .h files
[libcds.git] / tests / unit / print_segmentedqueue_stat.h
1 //$$CDS-header$$
2
3 #ifndef CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H
4 #define CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H
5
6 #include <ostream>
7
8 namespace std {
9     static inline std::ostream& operator <<( std::ostream& o, cds::intrusive::segmented_queue::stat<> const& s )
10     {
11         return o << "\tStatistics:\n"
12             << "\t                    Push: " << s.m_nPush.get()           << "\n"
13             << "\t          Push populated: " << s.m_nPushPopulated.get()  << "\n"
14             << "\tPush failed (contention): " << s.m_nPushContended.get()  << "\n"
15             << "\t                     Pop: " << s.m_nPop.get()            << "\n"
16             << "\t               Pop empty: " << s.m_nPopEmpty.get()       << "\n"
17             << "\t Pop failed (contention): " << s.m_nPopContended.get()      << "\n"
18             << "\t Segment create requests: " << s.m_nCreateSegmentReq.get()  << "\n"
19             << "\t Segment delete requests: " << s.m_nDeleteSegmentReq.get()  << "\n"
20             << "\t         Segment created: " << s.m_nSegmentCreated.get()    << "\n"
21             << "\t         Segment deleted: " << s.m_nSegmentDeleted.get()    << "\n";
22     }
23
24     static inline ostream& operator <<( ostream& o, cds::intrusive::segmented_queue::empty_stat const& /*s*/ )
25     {
26         return o;
27     }
28
29 } // namespace std
30
31 #endif // #ifndef CDSUNIT_PRINT_SEGMENTEDQUEUE_STAT_H