Skip to content

Commit

Permalink
Add show big files.
Browse files Browse the repository at this point in the history
  • Loading branch information
twose committed Nov 20, 2018
1 parent bb04887 commit a4f53c6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@
<file role="doc" name="examples/task/task_queue.php" />
<file role="doc" name="examples/task/task_stream.php" />
<file role="doc" name="examples/test.jpg" />
<file role="doc" name="examples/test_big.jpg" />
<file role="doc" name="examples/test_buffer.php" />
<file role="doc" name="examples/test_server.c" />
<file role="doc" name="examples/timer/after.php" />
Expand Down Expand Up @@ -1020,6 +1019,7 @@
<file role="test" name="tests/swoole_mysql/transaction_rollback.phpt" />
<file role="test" name="tests/swoole_mysql_coro/aborted_clients.phpt" />
<file role="test" name="tests/swoole_mysql_coro/bug_0814.phpt" />
<file role="test" name="tests/swoole_mysql_coro/err_instead_of_eof.phpt" />
<file role="test" name="tests/swoole_mysql_coro/fetch.phpt" />
<file role="test" name="tests/swoole_mysql_coro/fetch_mode.phpt" />
<file role="test" name="tests/swoole_mysql_coro/fetch_mode_twice.phpt" />
Expand All @@ -1034,6 +1034,7 @@
<file role="test" name="tests/swoole_mysql_coro/procedure_in_fetch.phpt" />
<file role="test" name="tests/swoole_mysql_coro/procedure_single.phpt" />
<file role="test" name="tests/swoole_mysql_coro/procedure_with_query.phpt" />
<file role="test" name="tests/swoole_mysql_coro/procedure_with_query_and_prepare.phpt" />
<file role="test" name="tests/swoole_mysql_coro/query.phpt" />
<file role="test" name="tests/swoole_mysql_coro/query_timeout.phpt" />
<file role="test" name="tests/swoole_mysql_coro/readonly.phpt" />
Expand Down Expand Up @@ -1338,6 +1339,7 @@
<file role="src" name="tools/get-ip-info.php" />
<file role="src" name="tools/pecl-package.php" />
<file role="src" name="tools/send-http-data.php" />
<file role="src" name="tools/show-big-files.php" />
<file role="src" name="travis/.gitignore" />
<file role="doc" name="travis/README.md" />
<file role="src" name="travis/debug/swoole_table_implements.php" />
Expand Down
12 changes: 12 additions & 0 deletions tools/show-big-files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env php
<?php
require __DIR__ . '/functions.php';

$git_files = swoole_git_files();
$git_files_map = [];
foreach ($git_files as $file) {
$git_files_map[$file] = filesize(__DIR__ . "/../{$file}");
}
array_multisort($git_files_map, SORT_DESC);
$git_files_map = array_slice($git_files_map, 0, 36);
echo json_encode($git_files_map, JSON_UNESCAPED_SLASHES | JSON_PRETTY_PRINT);

0 comments on commit a4f53c6

Please sign in to comment.