Telemetry events

* Don't trace event on exit
change 'PowertoyModuleDeleter' to not call 'module->disable();' before 'module->destroy();' so the module can distinguish between being turned off and PowerToys exiting.
Code formatting.

* uppercase for event name

* Trace on/off event for ShortcutGuide module

* Trace the 'hide' event only if the guide was visible
'on_hide()' is invoked when the module is turned off, in that case don't trace the hide event.

* Remove spaces in data field names
Remove 'ShowGuide' event since it's not providing any useful data.

* Include build number in version number
This commit is contained in:
Enrico Giordani
2019-10-22 08:11:23 +02:00
committed by GitHub
parent 5fb59cd64a
commit a07a42624b
11 changed files with 79 additions and 49 deletions

View File

@@ -240,7 +240,6 @@ void D2DOverlayWindow::show(HWND active_window) {
tasklist_cv_mutex.unlock();
tasklist_cv.notify_one();
}
Trace::EventShow();
}
void D2DOverlayWindow::animate(int vk_code) {
@@ -350,7 +349,11 @@ void D2DOverlayWindow::on_hide() {
DwmUnregisterThumbnail(thumbnail);
}
std::chrono::steady_clock::time_point shown_end_time = std::chrono::steady_clock::now();
Trace::EventHide(std::chrono::duration_cast<std::chrono::milliseconds>(shown_end_time - shown_start_time).count(), key_pressed);
// Trace the event only if the overaly window was visible.
if (shown_start_time.time_since_epoch().count() > 0) {
Trace::EventHide(std::chrono::duration_cast<std::chrono::milliseconds>(shown_end_time - shown_start_time).count(), key_pressed);
shown_start_time = {};
}
key_pressed.clear();
}