Skip to content

Bye Bye chunkperf.php 👋 #32442

Merged
blizzz merged 2 commits intomasterfrom
debt/noid/hello-chunkperf
May 19, 2022
Merged

Bye Bye chunkperf.php 👋 #32442
blizzz merged 2 commits intomasterfrom
debt/noid/hello-chunkperf

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented May 16, 2022

I found this gem in our psalm-baseline.xml today 🤣

It's a script to upload a file in chunks to Nextcloud.
Fixed the psalm warning, the autoloader import and added a usage message.
Decided to remove the script.

php chunkperf.php http://server:80/index.php admin password /home/daniel/Downloads/herbst_version2.mp4 10

MKCOL http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928 ... 405 - 0.21005487442017 seconds

PUT http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/0 ... 405 - 0.21709990501404 seconds

PUT http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/1 ... 405 - 0.21805095672607 seconds

PUT http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/2 ... 405 - 0.24585294723511 seconds

PUT http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/3 ... 405 - 0.24216413497925 seconds

PUT http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/4 ... 405 - 0.22598385810852 seconds

MOVE http://server:80/index.php/uploads/admin/transfer6282b1818dce32.43375928/.file ... 405 - 0.20804595947266 seconds

@kesselb kesselb added 3. to review Waiting for reviews technical debt labels May 16, 2022
@kesselb kesselb requested a review from a team May 16, 2022 20:24
@kesselb kesselb self-assigned this May 16, 2022
@kesselb kesselb requested review from CarlSchwan, blizzz and come-nc and removed request for a team May 16, 2022 20:24
@kesselb
Copy link
Contributor Author

kesselb commented May 17, 2022

image

I don't know how to fix this error 😕

Copy link
Contributor

@come-nc come-nc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be an occ command no?

* @return array
*/
function request($client, $method, $uploadUrl, $data = null, $headers = []) {
function request($client, $method, $uploadUrl, $data = null, $headers = []): array {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
function request($client, $method, $uploadUrl, $data = null, $headers = []): array {
function request(Client $client, string $method, string $uploadUrl, $data = null, array $headers = []): array {

@kesselb
Copy link
Contributor Author

kesselb commented May 17, 2022

Should be an occ command no?

Maybe ;) It seems the script was added with 72f5c53 as helper to test and benchmark chunked uploads. It's broken for quite some time (because the path to 3rdparty autoloader was wrong). I have really no idea about the psalm warnings. Maybe it's easier to just remove it 🤔

@CarlSchwan
Copy link
Member

I would remove it completely (see #31943 (comment))

kesselb added 2 commits May 17, 2022 17:25
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the debt/noid/hello-chunkperf branch from 24dcfcf to 33cd7bf Compare May 17, 2022 15:25
@kesselb kesselb changed the title Hello chunkperf.php 👋 Bye Bye chunkperf.php 👋 May 17, 2022
@kesselb kesselb added this to the Nextcloud 25 milestone May 18, 2022
@kesselb kesselb added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 18, 2022
@blizzz blizzz merged commit 2c5d604 into master May 19, 2022
@blizzz blizzz deleted the debt/noid/hello-chunkperf branch May 19, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish technical debt

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants