New issue
Advanced search Search tips

Issue 845139 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature

Blocked on:
issue 698429



Sign in to add a comment

Prettify JSON in logdog

Project Member Reported by nednguyen@chromium.org, May 21 2018

Issue description

https://logs.chromium.org/v/?s=chrome%2Fbb%2Fchromium.perf%2Flinux-perf%2F92%2F%2B%2FBenchmarks_Logs_4611c0fa-8126-40d5-9b6d-d7fee08d893c is an example logdog file that contains the links to our perf benchmark logs.

The page is a bit hard to use. Beside linkinfy the urls ( issue 844434 ) Would be great if we can make the page render a bit nicer (maybe add color?)


 

Comment 1 by hinoka@chromium.org, May 21 2018

Nodir provided this idea:

a more generic alternative is to return raw JSON with “Content-Type: application/json” header. I have a Chrome extension that renders JSON nicely.

The extension I use is this:
https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en

I think this is a more feasible solution than logdog knowing how to render JSON.  logdog was designed to be as content-agnostic as reasonable.

Comment 2 by mar...@chromium.org, May 21 2018

Cc: mar...@chromium.org
Labels: -Type-Bug -Pri-2 Pri-3 Type-Feature
Status: Available (was: Untriaged)
I'm kinda torn about allowing tools to specify the content-type, I see this as an attack vector.

Comment 3 by no...@chromium.org, May 25 2018

Note that LogDog already supports user-defined content type
nodir@: how do I specify the content type? Currently I use logdog_helper.text(..) to upload to logdog (https://cs.chromium.org/chromium/src/tools/perf/process_perf_results.py?rcl=5b8466d84c801a9dfe140cb9a9f6be3a8caba230&l=164)
CL to plumb content type: https://chromium-review.googlesource.com/c/chromium/src/+/1073390

If possible, I think it would be great to make lodog prettify json if it detects the content has json type. THe reason is any extra step we ask sheriff to do (install Chrome extension in this case), the harder it would be for everyone to follow through it.
Project Member

Comment 7 by bugdroid1@chromium.org, May 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/995c023528749c4f40c49150f31bd1c4ca59de61

commit 995c023528749c4f40c49150f31bd1c4ca59de61
Author: nednguyen <nednguyen@google.com>
Date: Fri May 25 15:20:15 2018

Set json content type for perf's logdog pages that display json content

TBR=jbudorick@chromium.org

Bug: 845139
Change-Id: I293032217af574b8980defb5142e2b21c1a1517f
Reviewed-on: https://chromium-review.googlesource.com/1073390
Reviewed-by: Ned Nguyen <nednguyen@google.com>
Reviewed-by: Emily Hanley <eyaich@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Commit-Queue: Ned Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#561883}
[modify] https://crrev.com/995c023528749c4f40c49150f31bd1c4ca59de61/build/android/pylib/utils/logdog_helper.py
[modify] https://crrev.com/995c023528749c4f40c49150f31bd1c4ca59de61/tools/perf/process_perf_results.py

Nodir: even with the extension enabled and the change in #7, I still don't see the prettified JSON in https://logs.chromium.org/v/?s=chrome%2Fbb%2Fchromium.perf%2Flinux-perf%2F135%2F%2B%2FBenchmarks_Logs_32077835-ffb6-4c9a-993a-fd1097ae3f91 

Can you let me know if something is missing?

Comment 9 by hinoka@chromium.org, May 29 2018

Blockedon: 698429
Custom content-type is supported in another endpoint that isn't quite ready yet.  ETA: EOQ

Sign in to add a comment