reorder some struct declarations in profiler

This commit is contained in:
Tim Kuehn 2013-08-29 00:45:11 -04:00
parent cf4107e262
commit 1d2c038954

View file

@ -52,14 +52,6 @@ pub enum ProfilerCategory {
// FIXME(rust#8803): workaround for lack of CTFE function on enum types to return length
NumBuckets,
}
type ProfilerBuckets = TreeMap<ProfilerCategory, ~[float]>;
// back end of the profiler that handles data aggregation and performance metrics
pub struct Profiler {
port: Port<ProfilerMsg>,
buckets: ProfilerBuckets,
last_msg: Option<ProfilerMsg>,
}
impl ProfilerCategory {
// convenience function to not have to cast every time
@ -99,6 +91,15 @@ impl ProfilerCategory {
}
}
type ProfilerBuckets = TreeMap<ProfilerCategory, ~[float]>;
// back end of the profiler that handles data aggregation and performance metrics
pub struct Profiler {
port: Port<ProfilerMsg>,
buckets: ProfilerBuckets,
last_msg: Option<ProfilerMsg>,
}
impl Profiler {
pub fn create(port: Port<ProfilerMsg>) {
let port = Cell::new(port);