Skip to content

Commit 340de87

Browse files
added timer to download fetch results
1 parent 5bca2e8 commit 340de87

4 files changed

Lines changed: 12 additions & 0 deletions

File tree

CivitAI.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ function Download-Files-From-Database {
111111

112112
$temp_query = "SELECT username, id, filename, extension, width, height, url, createdAt FROM Files $WhereQuery;"
113113

114+
$stopwatch_temp = [System.Diagnostics.Stopwatch]::StartNew()
114115
# Write-Host "temp_query: $temp_query" -ForegroundColor Yellow
115116
$result = Invoke-SQLiteQuery -DataSource $DBFilePath -Query $temp_query
117+
$stopwatch_temp.Stop()
118+
Write-Host "`nFetched results in $($stopwatch_temp.Elapsed.TotalSeconds) seconds." -ForegroundColor Green
116119
######################################
117120
if ($result.Count -gt 0) {
118121
Start-Download -SiteName "CivitAI" -FileList $result

DeviantArt.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ function Download-Files-From-Database {
111111

112112
$temp_query = "SELECT username, deviationID, src_url, extension, height, width, title, published_time FROM Files $WhereQuery;"
113113

114+
$stopwatch_temp = [System.Diagnostics.Stopwatch]::StartNew()
114115
# Write-Host "temp_query: $temp_query" -ForegroundColor Yellow
115116
$result = Invoke-SQLiteQuery -DataSource $DBFilePath -Query $temp_query
117+
$stopwatch_temp.Stop()
118+
Write-Host "`nFetched results in $($stopwatch_temp.Elapsed.TotalSeconds) seconds." -ForegroundColor Green
116119
######################################
117120
if ($result.Count -gt 0) {
118121
Start-Download -SiteName "DeviantArt" -FileList $result

Kemono.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,11 @@ function Download-Files-From-Database {
146146

147147
$temp_query = "SELECT postID, creatorName, hash, hash_extension, filename, filename_extension, url, file_index FROM Files $WhereQuery;"
148148

149+
$stopwatch_temp = [System.Diagnostics.Stopwatch]::StartNew()
149150
# Write-Host "temp_query: $temp_query" -ForegroundColor Yellow
150151
$result = Invoke-SQLiteQuery -DataSource $DBFilePath -Query $temp_query
152+
$stopwatch_temp.Stop()
153+
Write-Host "`nFetched results in $($stopwatch_temp.Elapsed.TotalSeconds) seconds." -ForegroundColor Green
151154
######################################
152155
if ($result.Count -gt 0) {
153156
Start-Download -SiteName "Kemono" -FileList $result

Rule34xxx.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,11 @@ function Download-Files-From-Database {
112112

113113
$temp_query = "SELECT id, url, hash, extension, createdAt, tags_artist, tags_character FROM Files $WhereQuery;"
114114

115+
$stopwatch_temp = [System.Diagnostics.Stopwatch]::StartNew()
115116
# Write-Host "temp_query: $temp_query" -ForegroundColor Yellow
116117
$result = Invoke-SQLiteQuery -DataSource $DBFilePath -Query $temp_query
118+
$stopwatch_temp.Stop()
119+
Write-Host "`nFetched results in $($stopwatch_temp.Elapsed.TotalSeconds) seconds." -ForegroundColor Green
117120
######################################
118121
if ($result.Count -gt 0) {
119122
Start-Download -SiteName "Gelbooru_Based" -FileList $result

0 commit comments

Comments
 (0)