mattermost-mobile/app/constants/general.ts
Elias Nahum d1d3fda83a
Request metrics improvements (#8420)
* Network metrics

* update network-client ref

* fix unit tests

* missing catch error parsing

* Replace API's to fetch all teams and channels for a user
Update groupLabel to use a type definition
Include effective Latency and Average Speed in the metrics
Include parallel and sequential request counts

* update network library and fix tests

* feat(MM-61865): send network request telemetry data to the server (#8436)

* feat(MM-61865): send network info telemetry data

* unit testing

* fix latency vs effectiveLatency

* cleanup test

* fix failing tests

* fix spelling error

* fix failing test

* more cleanup

* fix: improve parallel requests calculation (#8439)

* fix: improve parallel requests calculation

* fix test issue

* multiple parallelGroups testing

* calculateAverageSpeedWithCategories test

* categorizedRequests in it's own describe

* clean up duplicate tests

* check for when groupLabel is non-existent

* a case when groupLabel is non-existent

* more testing with effective latency.

* resolveAndFlattenModels with a capital F

* add try..catch within resolveAndFlattenModels

* update groupLabel to fix failing lint

* fix linting issue due to unknown group label

* forgot to push changes

* fix the indentation problem again

* add env var option for COLLECT_NETWORK_METRICS

---------

Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-16 13:55:29 -07:00

47 lines
1.6 KiB
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {toMilliseconds} from '@utils/datetime';
export default {
PAGE_SIZE_DEFAULT: 60,
POST_CHUNK_SIZE: 60,
POST_AROUND_CHUNK_SIZE: 10,
CHANNELS_CHUNK_SIZE: 50,
CHANNEL_MEMBERS_CHUNK_SIZE: 200,
CRT_CHUNK_SIZE: 60,
STATUS_INTERVAL: 60000,
AUTOCOMPLETE_LIMIT_DEFAULT: 25,
MENTION: 'mention',
OUT_OF_OFFICE: 'ooo',
OFFLINE: 'offline',
AWAY: 'away',
ONLINE: 'online',
DND: 'dnd',
STATUS_COMMANDS: ['offline', 'away', 'online', 'dnd'],
DEFAULT_CHANNEL: 'town-square',
DM_CHANNEL: 'D' as const,
OPEN_CHANNEL: 'O' as const,
PRIVATE_CHANNEL: 'P' as const,
GM_CHANNEL: 'G' as const,
TEAMMATE_NAME_DISPLAY: {
SHOW_USERNAME: 'username',
SHOW_NICKNAME_FULLNAME: 'nickname_full_name',
SHOW_FULLNAME: 'full_name',
},
SPECIAL_MENTIONS: new Set(['all', 'channel', 'here']),
MAX_USERS_IN_GM: 7,
MIN_USERS_IN_GM: 3,
MAX_GROUP_CHANNELS_FOR_PROFILES: 50,
MAX_GET_ROLES_BY_NAMES: 100,
DEFAULT_AUTOLINKED_URL_SCHEMES: ['http', 'https', 'ftp', 'mailto', 'tel', 'mattermost'],
PROFILE_CHUNK_SIZE: 100,
SEARCH_TIMEOUT_MILLISECONDS: 500,
AUTOCOMPLETE_SPLIT_CHARACTERS: ['.', '-', '_'],
CHANNEL_USER_ROLE: 'channel_user',
RESTRICT_DIRECT_MESSAGE_ANY: 'any',
TIME_TO_FIRST_REVIEW: toMilliseconds({days: 14}),
TIME_TO_NEXT_REVIEW: toMilliseconds({days: 90}),
NPS_PLUGIN_ID: 'com.mattermost.nps',
NPS_PLUGIN_BOT_USERNAME: 'feedbackbot',
};