Skip to content

Commit

Permalink
Improved auto test duration formula; Updated to latest gradle etc
Browse files Browse the repository at this point in the history
  • Loading branch information
adolfintel committed Sep 27, 2020
1 parent e4ab5fc commit 65e0c4c
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 9 deletions.
18 changes: 18 additions & 0 deletions Speedtest-Android/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions Speedtest-Android/.idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Speedtest-Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "your.name.here.speedtest"
minSdkVersion 15
targetSdkVersion 28
versionCode 6
versionName '1.2'
versionCode 8
versionName '1.2.2'
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ public void onError(String err) {
for (DownloadStream d : streams) totDownloaded += d.getTotalDownloaded();
double speed = totDownloaded / ((t<100?100:t) / 1000.0);
if (config.getTime_auto()) {
double b = (3.2 * speed) / 100000.0;
bonusT += b > 400 ? 400 : b;
double b = (2.5 * speed) / 100000.0;
bonusT += b > 200 ? 200 : b;
}
double progress = (t + bonusT) / (double) (config.getTime_dl_max() * 1000);
speed = (speed * 8 * config.getOverheadCompensationFactor()) / (config.getUseMebibits() ? 1048576.0 : 1000000.0);
Expand Down Expand Up @@ -176,8 +176,8 @@ public void onError(String err) {
for (UploadStream u : streams) totUploaded += u.getTotalUploaded();
double speed = totUploaded / ((t<100?100:t) / 1000.0);
if (config.getTime_auto()) {
double b = (3.2 * speed) / 100000.0;
bonusT += b > 400 ? 400 : b;
double b = (2.5 * speed) / 100000.0;
bonusT += b > 200 ? 200 : b;
}
double progress = (t + bonusT) / (double) (config.getTime_ul_max() * 1000);
speed = (speed * 8 * config.getOverheadCompensationFactor()) / (config.getUseMebibits() ? 1048576.0 : 1000000.0);
Expand Down
2 changes: 1 addition & 1 deletion Speedtest-Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {

}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.0'
classpath 'com.android.tools.build:gradle:4.0.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
4 changes: 2 additions & 2 deletions Speedtest-Android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Mon Mar 09 08:55:09 CET 2020
#Sun Sep 27 20:23:36 CEST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip

0 comments on commit 65e0c4c

Please sign in to comment.