Thrill  0.1
stream.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * thrill/data/stream.cpp
3  *
4  * Part of Project Thrill - http://project-thrill.org
5  *
6  * Copyright (C) 2015-2017 Timo Bingmann <[email protected]>
7  * Copyright (C) 2015 Tobias Sturm <[email protected]>
8  *
9  * All rights reserved. Published under the BSD-2 license in the LICENSE file.
10  ******************************************************************************/
11 
12 #include <thrill/data/stream.hpp>
13 
16 
17 namespace thrill {
18 namespace data {
19 
20 /******************************************************************************/
21 // Stream
22 
24 { }
25 
26 void Stream::Close() {
27  return data().Close();
28 }
29 
30 /*----------------------------------------------------------------------------*/
31 
32 size_t Stream::tx_items() const {
33  return tx_net_items() + tx_int_items();
34 }
35 
36 size_t Stream::tx_bytes() const {
37  return tx_net_bytes() + tx_int_bytes();
38 }
39 
40 size_t Stream::tx_blocks() const {
41  return tx_net_blocks() + tx_int_blocks();
42 }
43 
44 size_t Stream::rx_items() const {
45  return rx_net_items() + rx_int_items();
46 }
47 
48 size_t Stream::rx_bytes() const {
49  return rx_net_bytes() + rx_int_bytes();
50 }
51 
52 size_t Stream::rx_blocks() const {
53  return rx_net_blocks() + rx_int_blocks();
54 }
55 
56 /*----------------------------------------------------------------------------*/
57 
58 size_t Stream::tx_net_items() const {
59  return data().tx_net_items_;
60 }
61 
62 size_t Stream::tx_net_bytes() const {
63  return data().tx_net_bytes_;
64 }
65 
66 size_t Stream::tx_net_blocks() const {
67  return data().tx_net_blocks_;
68 }
69 
70 size_t Stream::rx_net_items() const {
71  return data().rx_net_items_;
72 }
73 
74 size_t Stream::rx_net_bytes() const {
75  return data().rx_net_bytes_;
76 }
77 
78 size_t Stream::rx_net_blocks() const {
79  return data().rx_net_blocks_;
80 }
81 
82 /*----------------------------------------------------------------------------*/
83 
84 size_t Stream::tx_int_items() const {
85  return data().tx_int_items_;
86 }
87 
88 size_t Stream::tx_int_bytes() const {
89  return data().tx_int_bytes_;
90 }
91 
92 size_t Stream::tx_int_blocks() const {
93  return data().tx_int_blocks_;
94 }
95 
96 size_t Stream::rx_int_items() const {
97  return data().rx_int_items_;
98 }
99 
100 size_t Stream::rx_int_bytes() const {
101  return data().rx_int_bytes_;
102 }
103 
104 size_t Stream::rx_int_blocks() const {
105  return data().rx_int_blocks_;
106 }
107 
108 /*----------------------------------------------------------------------------*/
109 
110 } // namespace data
111 } // namespace thrill
112 
113 /******************************************************************************/
std::atomic< size_t > rx_net_items_
size_t tx_int_bytes() const
return number of bytes transmitted via internal loopback queues
Definition: stream.cpp:88
size_t rx_int_items() const
return number of items received via network internal loopback queues
Definition: stream.cpp:96
size_t tx_net_bytes() const
return number of bytes transmitted via network excluding internal tx
Definition: stream.cpp:62
std::atomic< size_t > tx_net_items_
size_t tx_bytes() const
return number of bytes transmitted
Definition: stream.cpp:36
size_t tx_net_items() const
return number of items transmitted via network excluding internal tx
Definition: stream.cpp:58
size_t rx_net_bytes() const
return number of bytes received via network excluding internal tx
Definition: stream.cpp:74
std::atomic< size_t > rx_int_items_
std::atomic< size_t > rx_net_bytes_
std::atomic< size_t > tx_int_bytes_
size_t tx_int_blocks() const
return number of blocks transmitted via internal loopback queues
Definition: stream.cpp:92
std::atomic< size_t > rx_int_bytes_
size_t tx_net_blocks() const
return number of blocks transmitted via network excluding internal tx
Definition: stream.cpp:66
size_t rx_net_items() const
return number of items received via network excluding internal tx
Definition: stream.cpp:70
void Close()
shuts down the stream, waits for all closing blocks
Definition: stream.cpp:26
virtual StreamData & data()=0
Return stream data reference.
size_t rx_items() const
return number of items received
Definition: stream.cpp:44
std::atomic< size_t > tx_net_bytes_
size_t rx_bytes() const
return number of bytes received
Definition: stream.cpp:48
size_t tx_blocks() const
return number of blocks transmitted
Definition: stream.cpp:40
virtual void Close()=0
shuts the stream down.
std::atomic< size_t > rx_int_blocks_
std::atomic< size_t > tx_net_blocks_
size_t rx_int_bytes() const
return number of bytes received via network internal loopback queues
Definition: stream.cpp:100
size_t rx_net_blocks() const
return number of blocks received via network excluding internal tx
Definition: stream.cpp:78
size_t tx_int_items() const
return number of items transmitted via internal loopback queues
Definition: stream.cpp:84
std::atomic< size_t > tx_int_blocks_
size_t tx_items() const
return number of items transmitted
Definition: stream.cpp:32
std::atomic< size_t > rx_net_blocks_
size_t rx_int_blocks() const
return number of blocks received via network internal loopback queues
Definition: stream.cpp:104
size_t rx_blocks() const
return number of blocks received
Definition: stream.cpp:52
std::atomic< size_t > tx_int_items_
virtual ~Stream()
Definition: stream.cpp:23