info.hh (7462:0c61c3cf7639) info.hh (7505:7772a8bf76ee)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 47 unchanged lines hidden (view full) ---

56/** Don't print if this is zero. */
57const FlagsType nozero = 0x0100;
58/** Don't print if this is NAN */
59const FlagsType nonan = 0x0200;
60
61/** Mask of flags that can't be set directly */
62const FlagsType __reserved = init | display;
63
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 47 unchanged lines hidden (view full) ---

56/** Don't print if this is zero. */
57const FlagsType nozero = 0x0100;
58/** Don't print if this is NAN */
59const FlagsType nonan = 0x0200;
60
61/** Mask of flags that can't be set directly */
62const FlagsType __reserved = init | display;
63
64struct StorageParams
65{
66 virtual ~StorageParams();
67};
68
64struct StorageParams;
69struct Visit;
70
71class Info
72{
73 public:
74 /** The name of the stat. */
75 std::string name;
76 /** The description of the stat. */

--- 86 unchanged lines hidden (view full) ---

163
164 public:
165 virtual size_type size() const = 0;
166 virtual const VCounter &value() const = 0;
167 virtual const VResult &result() const = 0;
168 virtual Result total() const = 0;
169};
170
65struct Visit;
66
67class Info
68{
69 public:
70 /** The name of the stat. */
71 std::string name;
72 /** The description of the stat. */

--- 86 unchanged lines hidden (view full) ---

159
160 public:
161 virtual size_type size() const = 0;
162 virtual const VCounter &value() const = 0;
163 virtual const VResult &result() const = 0;
164 virtual Result total() const = 0;
165};
166
167enum DistType { Deviation, Dist };
168
171struct DistData
172{
169struct DistData
170{
171 DistType type;
172 Counter min;
173 Counter max;
174 Counter bucket_size;
175
173 Counter min_val;
174 Counter max_val;
175 Counter underflow;
176 Counter overflow;
177 VCounter cvec;
178 Counter sum;
179 Counter squares;
180 Counter samples;
181};
182
176 Counter min_val;
177 Counter max_val;
178 Counter underflow;
179 Counter overflow;
180 VCounter cvec;
181 Counter sum;
182 Counter squares;
183 Counter samples;
184};
185
183enum DistType { Deviation, Dist };
184
185struct DistParams : public StorageParams
186{
187 const DistType type;
188
189 /** The minimum value to track. */
190 Counter min;
191 /** The maximum value to track. */
192 Counter max;
193 /** The number of entries in each bucket. */
194 Counter bucket_size;
195 /** The number of buckets. Equal to (max-min)/bucket_size. */
196 size_type buckets;
197
198 explicit DistParams(DistType t) : type(t) {}
199};
200
201class DistInfo : public Info
202{
203 public:
204 /** Local storage for the entry values, used for printing. */
205 DistData data;
206};
207
208class VectorDistInfo : public Info

--- 44 unchanged lines hidden ---
186class DistInfo : public Info
187{
188 public:
189 /** Local storage for the entry values, used for printing. */
190 DistData data;
191};
192
193class VectorDistInfo : public Info

--- 44 unchanged lines hidden ---