[Telemetry dashboard] Histogram selector should match inside the histogram name

RESOLVED FIXED in Moved to JIRA

Status

Mozilla Metrics
Frontend Reports
RESOLVED FIXED
7 years ago
6 years ago

People

(Reporter: Justin Lebar (not reading bugmail), Unassigned)

Tracking

unspecified
Moved to JIRA

Details

(Whiteboard: [JIRA BIV-109] [Telemetry:P1])

(Reporter)

Description

7 years ago
I could have sworn I'd filed a bug on this, but I can't find it.  So here's a new one.

Right now, the histogram selector only matches from the beginning of the histogram name.  But I should be able to type "JPEG" into the histogram selector and see all histograms which contain "JPEG".

What I'd like is something which roughly follows the following idiom.  Here, |search| is what the user typed into the search box, and |hist| is the histogram name.  This function returns true if |hist| matches |search|.

def match(search, hist):
  search_split = set(search.toLowerCase().split()) # split on spaces
  hist_split = set(special_split(hist.toLowerCase()))

  # Return true if every element in search_split is in hist_split
  return search_split.isSubset(hist_split)

def special_split(str):
  # Split |str| on "_", but return every possible joining of tokens.  For example, 
  # special_split("foo_bar_baz") returns ["foo", "bar", "baz", "bee", "foo_bar", 
  #                                       "bar_baz", "foo_bar_baz"].
  #
  # Implementation left as an exercise to the reader.  :)
(Reporter)

Comment 1

7 years ago
Should be

  # special_split("foo_bar_baz") returns ["foo", "bar", "baz", "foo_bar", 
  #                                       "bar_baz", "foo_bar_baz"].

Comment 2

7 years ago
Can you write that in perl please?  ;)
(Reporter)

Comment 3

7 years ago
Ah!  For perl, I imagine I could get close with

  $ cat /dev/urandom | head -n10
Whiteboard: [Telemetry]

Comment 4

6 years ago
Marking: in group of > 33 asks for Telemetry that need PM priority before triage/scheduling.
Status: NEW → ASSIGNED
Whiteboard: [Telemetry] → Telemetry -- needs PM project priority

Comment 5

6 years ago
Triaged.
Target Milestone: Unreviewed → Backlogged - BZ
Whiteboard: Telemetry -- needs PM project priority → [Telemetry:P1]

Updated

6 years ago
Whiteboard: [Telemetry:P1] → [JIRA BIV-109] [Telemetry:P1]

Updated

6 years ago
Target Milestone: Backlogged - BZ → Moved to JIRA

Comment 6

6 years ago
when searching for a measure it will not look only from the beginning of the string, but all string, for example, if you type "collector" it will show all measures that have "collector"

Updated

6 years ago
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
(In reply to Paulo Pires from comment #6)
> when searching for a measure it will not look only from the beginning of the
> string, but all string, for example, if you type "collector" it will show
> all measures that have "collector"

I don't see this behavior for Histogram and Evolution views, only in the Slow SQL view. Am I misunderstadning?
As Justin mentioned on IRC, if you don't see this functionality you should clear your cache.
The fix was accidentally regressed last week.  We re-opened the JIRA and are re-deploying the fix today.

Comment 10

6 years ago
This has been re-fixed.
You need to log in before you can comment on or make changes to this bug.