FeatureRequest: TrackFeatureTiming

5 posts, 0 answers
  1. Guest
    Guest avatar
    506 posts
    Member since:
    Feb 2012

    Posted 01 Sep 2011 Link to this post

    Hi, I'd like to propose another appropach for tracking feature timings: instead of monitor.TrackFeatureStart(); try { // do something monitor.TrackFeatureStop(); } catch { monitor.TrackFeatureCancel(); } have IDisposable helper class to write same code as following: using (var feature = montor.StartFeatureTiming()) { // do something feature.Done(); } It will assume feature was completed if .Done() method was called and feature was cancelled otherwise.
  2. Guest
    Guest avatar
    506 posts
    Member since:
    Feb 2012

    Posted 01 Sep 2011 Link to this post

    Hi Vitaliy Thank you for your feedback. We have discussed this approach to feature timing before but have chosen not to implement it. We want to keep the API as simple as possible so we constrain our selves to make these enhancements even though it will make some things easier. You can however easily implement this yourself. Try this class FT : IDisposable { } best regards, Thomas Andersen EQATEC Team
  3. Guest
    Guest avatar
    506 posts
    Member since:
    Feb 2012

    Posted 01 Sep 2011 Link to this post

    Ups i pressed an unknown shortcut. Here is what i meant to post class FT : IDisposable { private IAnalyticsMonitor m_Monitor; private string m_Name; public FT(IAnalyticsMonitor monitor, string name) { m_Monitor = monitor; m_Name = name; m_Monitor.TrackFeatureStart(name); } public void Stop() { m_Monitor.TrackFeatureStop(m_Name); } public void Dispose() { m_Monitor.TrackFeatureCancel(m_Name); } } .... using(FT ft = new FT(monitor, "SomeName")) { //Some actions to be timed ft.Stop(); } best regards, Thomas Andersen EQATEC Team
  4. Guest
    Guest avatar
    506 posts
    Member since:
    Feb 2012

    Posted 01 Sep 2011 Link to this post

    Thanks, I already implemented this feature and found IDisposable approach more handy than try / catch / rethrow. Just wanted to share my thoughts on API. Regards, Vitaliy
  5. Guest
    Guest avatar
    506 posts
    Member since:
    Feb 2012

    Posted 01 Sep 2011 Link to this post

    We value all feedback and are thankful that you are trying out out product and taking the time to write to us. Don't hesitate to write again, if you have any questions or feedback. best regards, Thomas Andersen EQATEC Team
Back to Top