Skip to content

Commit b5eecb1

Browse files
authored
Merge pull request #3089 from input-output-hk/feat/ddw-1163-better-cpu-formatting-in-analytics
[DDW-1163] CPU name grouping mechanism for analytics
2 parents ebb5b80 + a7352ef commit b5eecb1

File tree

6 files changed

+320
-128
lines changed

6 files changed

+320
-128
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### Features
66

7+
- Implemented CPU name grouping mechanism for analytics ([PR 3089](https://github.com/input-output-hk/daedalus/pull/3089))
78
- Implemented rounding RAM size in analytics ([PR 3088](https://github.com/input-output-hk/daedalus/pull/3088))
89

910
### Chores

source/renderer/app/analytics/MatomoClient.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import MatomoTracker from 'matomo-tracker';
22
import { AnalyticsClient } from './types';
33
import { Environment } from '../../../common/types/environment.types';
4-
import formatCpuInfo from '../utils/formatCpuInfo';
54
import {
65
ANALYTICS_API_ENDPOINT,
76
CPU_DIMENSION_KEY,
@@ -12,6 +11,7 @@ import {
1211
VERSION_DIMENSION_KEY,
1312
} from '../config/analyticsConfig';
1413
import { formattedBytesToSize } from '../utils/formatters';
14+
import { getShortCpuDescription } from '../utils/getShortCpuDescription';
1515

1616
/**
1717
* Matomo API reference:
@@ -32,7 +32,9 @@ export class MatomoClient implements AnalyticsClient {
3232
_id: this.userId,
3333
action_name: pageTitle,
3434
url: this.getAnalyticsURL(),
35-
[CPU_DIMENSION_KEY]: formatCpuInfo(this.environment.cpu),
35+
[CPU_DIMENSION_KEY]: getShortCpuDescription(
36+
this.environment.cpu[0]?.model
37+
),
3638
[RAM_DIMENSION_KEY]: formattedBytesToSize(this.environment.ram, 0),
3739
[OS_DIMENSION_KEY]: this.environment.os,
3840
[VERSION_DIMENSION_KEY]: this.environment.version,

source/renderer/app/utils/formatCpuInfo.spec.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

source/renderer/app/utils/formatCpuInfo.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)