多线程测试
This commit is contained in:
parent
68daa42635
commit
33b5401337
|
|
@ -23,7 +23,7 @@ public class ProxyVideo {
|
||||||
|
|
||||||
private static final String GO_SERVER = "http://127.0.0.1:7777/";
|
private static final String GO_SERVER = "http://127.0.0.1:7777/";
|
||||||
//线程数4
|
//线程数4
|
||||||
private static final int THREAD_NUM = 4;
|
private static final int THREAD_NUM = 16;
|
||||||
|
|
||||||
|
|
||||||
public static String buildCommonProxyUrl(String url, Map<String, String> headers) {
|
public static String buildCommonProxyUrl(String url, Map<String, String> headers) {
|
||||||
|
|
@ -168,7 +168,7 @@ public class ProxyVideo {
|
||||||
|
|
||||||
private static List<long[]> generatePart(Map<String, String> rangeObj, String total) {
|
private static List<long[]> generatePart(Map<String, String> rangeObj, String total) {
|
||||||
long start = Long.parseLong(rangeObj.get("start"));
|
long start = Long.parseLong(rangeObj.get("start"));
|
||||||
long end = StringUtils.isAllBlank(rangeObj.get("end")) ? start + 1024 * 1024 : Long.parseLong(rangeObj.get("end"));
|
long end = StringUtils.isAllBlank(rangeObj.get("end")) ? start + 1024 * 1024 *8 : Long.parseLong(rangeObj.get("end"));
|
||||||
|
|
||||||
|
|
||||||
long totalSize = Long.parseLong(total);
|
long totalSize = Long.parseLong(total);
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1 +1 @@
|
||||||
96d7f961b4345a4cbe94f8d932629541
|
03e4271da7d2c7c4e3176ffbc886ff98
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThread/jar/custom_spider.jar;md5;96d7f961b4345a4cbe94f8d932629541",
|
"spider": "https://ghproxy.net/https://raw.githubusercontent.com/lushunming/AndroidCatVodSpider/multiThread/jar/custom_spider.jar;md5;03e4271da7d2c7c4e3176ffbc886ff98",
|
||||||
"lives": [
|
"lives": [
|
||||||
{
|
{
|
||||||
"name": "电视直播",
|
"name": "电视直播",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue