Skip to content

Commit

Permalink
feat: Add performance measurement capabilities to SearchEngine
Browse files Browse the repository at this point in the history
In cozy/cozy-libs#2720 we added PerformanceAPI in the SearchEngine

This commit reflect the changes to the SearchEngine constructor

Related PR: cozy/cozy-libs#2720
  • Loading branch information
Ldoppea committed Jan 29, 2025
1 parent 1c0c5eb commit 8809c4c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/domain/search/search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import CozyClient from 'cozy-client'
import type { SearchOptions } from 'cozy-dataproxy-lib/dist/search/types'
import Minilog from 'cozy-minilog'

import { CozyClientPerformanceApi } from '/app/domain/performances/measure'
import { SearchEngine } from '/app/domain/search/dataproxy-wrapper'

const log = Minilog('📱🗂️ Search')
Expand All @@ -10,7 +11,7 @@ let searchEngine: SearchEngine | undefined = undefined

export const initSearchEngine = (client: CozyClient): void => {
log.debug('Init SearchEngine')
searchEngine = new SearchEngine(client)
searchEngine = new SearchEngine(client, CozyClientPerformanceApi)
}

export const search = (query: string, options: SearchOptions): unknown => {
Expand Down

0 comments on commit 8809c4c

Please sign in to comment.