Skip to content
Permalink
Browse files

reorder some struct declarations in profiler

  • Loading branch information
Tim Kuehn
Tim Kuehn committed Aug 29, 2013
1 parent cf4107e commit 1d2c038954d58e251305bf99a94b5c2c952c4a08
Showing with 9 additions and 8 deletions.
  1. +9 −8 src/components/util/time.rs
@@ -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);

5 comments on commit 1d2c038

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Aug 29, 2013

saw approval from metajack
at tikue@1d2c038

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Aug 29, 2013

merging tikue/servo/master = 1d2c038 into auto

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Aug 29, 2013

tikue/servo/master = 1d2c038 merged ok, testing candidate = 65c6435

@bors-servo

This comment has been minimized.

Copy link
Contributor

@bors-servo bors-servo replied Aug 29, 2013

fast-forwarding master to auto = 65c6435

Please sign in to comment.
You can’t perform that action at this time.