Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Issue 23781012: Upload file to app engine and generate public url for dmprof visualizer. (Closed)

Created:
7 years, 3 months ago by junjianx
Modified:
7 years, 3 months ago
CC:
chromium-reviews, dmikurube+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Upload file to app engine and generate public url for dmprof visualizer. User is able to upload their local dmprof file to app engine. A public url will be generated for the uploaded file to show the breakdown with default template. Everyone can see it by generated url. Because Entity in ndb of app engine only permits 1MB object to be stored. Store json file in blobstore and file reference in profiler entity. BUG=259206 NOTRY=True Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=225141

Patch Set 1 #

Patch Set 2 : Add comments. #

Patch Set 3 : Use blobstore to store json file #

Total comments: 14

Patch Set 4 : Add unit test and separate business logic layer to services.py #

Total comments: 6

Patch Set 5 : Add default_template attribute validation #

Total comments: 8

Patch Set 6 : Fix review problems. #

Total comments: 7

Patch Set 7 : Fix review problems #

Total comments: 5

Patch Set 8 : Fix review problems #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -6 lines) Patch
A tools/deep_memory_profiler/visualizer/app.py View 1 2 3 4 5 6 7 1 chunk +74 lines, -0 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/app_unittest.py View 1 2 3 4 5 1 chunk +79 lines, -0 lines 0 comments Download
M tools/deep_memory_profiler/visualizer/index.html View 1 2 3 4 5 6 1 chunk +21 lines, -4 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/run_tests.py View 1 2 3 4 5 1 chunk +28 lines, -0 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/services.py View 1 2 3 4 1 chunk +77 lines, -0 lines 0 comments Download
M tools/deep_memory_profiler/visualizer/static/profiler.js View 4 1 chunk +2 lines, -2 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/testdata/error_sample.json View 1 2 3 4 1 chunk +54 lines, -0 lines 0 comments Download
A tools/deep_memory_profiler/visualizer/testdata/sample.json View 1 2 3 4 5 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (0 generated)
junjianx
I finished file uploading and public url generating by app engine. Please review my code, ...
7 years, 3 months ago (2013-09-17 11:07:24 UTC) #1
sullivan
This code could really use some unit tests! App engine has an excellent unit testing ...
7 years, 3 months ago (2013-09-17 14:58:47 UTC) #2
junjianx
On 2013/09/17 14:58:47, sullivan wrote: > This code could really use some unit tests! App ...
7 years, 3 months ago (2013-09-18 02:15:03 UTC) #3
junjianx
To write testable code, I separated business logic layer and Models to services.py. After that, ...
7 years, 3 months ago (2013-09-20 06:31:08 UTC) #4
sullivan
https://codereview.chromium.org/23781012/diff/12001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/12001/tools/deep_memory_profiler/visualizer/app.py#newcode51 tools/deep_memory_profiler/visualizer/app.py:51: default_key = services.CreateTemplates(blob_info) Reading the code, right now I ...
7 years, 3 months ago (2013-09-20 13:59:50 UTC) #5
junjianx
I added validation for default_template attribute in main logic. In the future, file validation should ...
7 years, 3 months ago (2013-09-24 05:53:53 UTC) #6
Dai Mikurube (NOT FULLTIME)
The code basically looks good (while I might overlook some AppEngine-specific things). Some comments. https://codereview.chromium.org/23781012/diff/26001/tools/deep_memory_profiler/visualizer/app_unittest.py ...
7 years, 3 months ago (2013-09-24 07:22:11 UTC) #7
junjianx
I fixed review problems indicated by @Dai. https://codereview.chromium.org/23781012/diff/26001/tools/deep_memory_profiler/visualizer/app_unittest.py File tools/deep_memory_profiler/visualizer/app_unittest.py (right): https://codereview.chromium.org/23781012/diff/26001/tools/deep_memory_profiler/visualizer/app_unittest.py#newcode6 tools/deep_memory_profiler/visualizer/app_unittest.py:6: import services ...
7 years, 3 months ago (2013-09-24 08:11:20 UTC) #8
Dai Mikurube (NOT FULLTIME)
Some more comments. https://codereview.chromium.org/23781012/diff/36001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/36001/tools/deep_memory_profiler/visualizer/app.py#newcode40 tools/deep_memory_profiler/visualizer/app.py:40: template_values['template'] = 'null' The strings 'null' ...
7 years, 3 months ago (2013-09-24 09:15:15 UTC) #9
junjianx
I fixed review problems indicated by @Dai. https://codereview.chromium.org/23781012/diff/36001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/36001/tools/deep_memory_profiler/visualizer/app.py#newcode40 tools/deep_memory_profiler/visualizer/app.py:40: template_values['template'] = ...
7 years, 3 months ago (2013-09-24 09:46:43 UTC) #10
Dai Mikurube (NOT FULLTIME)
Two more comments. https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py#newcode38 tools/deep_memory_profiler/visualizer/app.py:38: if run_id and tmpl_id: It looks ...
7 years, 3 months ago (2013-09-24 10:13:09 UTC) #11
junjianx
Just replied Dai's comments. https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py#newcode38 tools/deep_memory_profiler/visualizer/app.py:38: if run_id and tmpl_id: On ...
7 years, 3 months ago (2013-09-24 10:25:19 UTC) #12
sullivan
lgtm https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py File tools/deep_memory_profiler/visualizer/app.py (right): https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py#newcode59 tools/deep_memory_profiler/visualizer/app.py:59: 'upload_msg': 'No default key was found.' Maybe 'No ...
7 years, 3 months ago (2013-09-24 12:29:20 UTC) #13
junjianx
On 2013/09/24 12:29:20, sullivan wrote: > lgtm > > https://codereview.chromium.org/23781012/diff/40001/tools/deep_memory_profiler/visualizer/app.py > File tools/deep_memory_profiler/visualizer/app.py (right): > ...
7 years, 3 months ago (2013-09-25 01:02:51 UTC) #14
Dai Mikurube (NOT FULLTIME)
lgtm
7 years, 3 months ago (2013-09-25 02:48:45 UTC) #15
junjianx
On 2013/09/25 02:48:45, Dai Mikurube wrote: > lgtm Thanks for your review :)
7 years, 3 months ago (2013-09-25 04:40:08 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/junjianx@chromium.org/23781012/52001
7 years, 3 months ago (2013-09-25 04:40:33 UTC) #17
commit-bot: I haz the power
7 years, 3 months ago (2013-09-25 04:42:03 UTC) #18
Message was sent while issue was closed.
Change committed as 225141

Powered by Google App Engine
This is Rietveld 408576698