This is a migrated thread and some comments may be shown as answers.

FeatureRequest: TrackFeatureTiming

4 Answers 49 Views
Monitor integration
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Guest
Top achievements
Rank 1
Guest asked on 01 Sep 2011, 05:47 PM
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.

4 Answers, 1 is accepted

Sort by
0
Guest
Top achievements
Rank 1
answered on 01 Sep 2011, 05:47 PM
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
0
Guest
Top achievements
Rank 1
answered on 01 Sep 2011, 05:47 PM
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
0
Guest
Top achievements
Rank 1
answered on 01 Sep 2011, 05:47 PM
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
0
Guest
Top achievements
Rank 1
answered on 01 Sep 2011, 05:47 PM
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
Tags
Monitor integration
Asked by
Guest
Top achievements
Rank 1
Answers by
Guest
Top achievements
Rank 1
Share this question
or