Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: implement server for rendering diff #290

Closed
wants to merge 4 commits into from

Conversation

iOliverNguyen
Copy link
Contributor

@iOliverNguyen iOliverNguyen commented Jul 16, 2021

This PR supports 2 formats for render URL, which allows responding combined data for rendering diff:

format: single

  • URL: /render?from=...&until=...
  • Response:
    • add "format": "single" to flamebearer and metadata
    • levels: x_offset, total, self, name_index
{
  "flamebearer": {
    "format": "single",
    "names": [ ... ]
    "levels": [ i, ..., i+3 ]
    // ....
  },
  "metadata": {
    "format": "single",
    // ....
  },
  "timeline": { ... }
}

format: double

  • URL: /render?left=...&until=...&leftFrom=...&leftUntil=...&rightFrom=...&rightUntil=...
  • Response:
    • add "format": "double" to flamebearer and metadata
    • levels: left_x_offset, left_total, left_self, right_x_offset, right_total, right_self, name_index
{
  "flamebearer": {
    "format": "double",
    "names": [ ... ]
    "levels": [ i, ..., i+6 ]
    // ...
  },
  "metadata": {
    "format": "double",
     // ...
  },
  "timeline": { ... }
}

Depends: #288

@iOliverNguyen iOliverNguyen requested a review from petethepig July 16, 2021 15:34
@iOliverNguyen iOliverNguyen mentioned this pull request Jul 16, 2021
11 tasks
@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

Merging #290 (bd2230c) into main (9327bd6) will increase coverage by 1.13%.
The diff coverage is 81.09%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #290      +/-   ##
==========================================
+ Coverage   53.16%   54.29%   +1.13%     
==========================================
  Files          96       97       +1     
  Lines        4244     4421     +177     
==========================================
+ Hits         2256     2400     +144     
- Misses       1773     1802      +29     
- Partials      215      219       +4     
Impacted Files Coverage Δ
pkg/server/handler.go 0.44% <0.00%> (-<0.01%) ⬇️
pkg/server/render.go 55.79% <30.24%> (-22.39%) ⬇️
pkg/storage/tree/treediff.go 98.51% <98.51%> (ø)
pkg/storage/tree/flamebearer.go 100.00% <100.00%> (ø)
pkg/agent/target/target.go 54.29% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9327bd6...bd2230c. Read the comment docs.

@iOliverNguyen iOliverNguyen changed the title wip: response combined data for diff WIP: response combined data for diff Jul 16, 2021
@iOliverNguyen
Copy link
Contributor Author

Also, I'm working on combining data from 2 trees into the new flamebearer format: [i+0, ..., i+6].

@iOliverNguyen iOliverNguyen force-pushed the feature/diff-server branch 3 times, most recently from 8f4e24d to 163410a Compare July 22, 2021 14:53
@iOliverNguyen iOliverNguyen changed the title WIP: response combined data for diff response combined data for rendering diff tree Jul 22, 2021
@iOliverNguyen iOliverNguyen changed the title response combined data for rendering diff tree WIP: implement server for rendering diff Jul 24, 2021
@kolesnikovae kolesnikovae mentioned this pull request Jul 24, 2021
8 tasks
@petethepig petethepig closed this Jul 27, 2021
@petethepig
Copy link
Member

Closed this one as all the commits are copied in #289

@petethepig petethepig deleted the feature/diff-server branch July 27, 2021 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants