Placate the linter

- check for errors when I was previously skipping them
- use module `time` better

Drive-by: Shorter way to copy the new `index.html` to the 5 servers.
This commit is contained in:
Brian Cunnie
2024-11-17 07:22:37 -08:00
parent 8c89816eeb
commit 3ed466bc74
4 changed files with 18 additions and 7 deletions

View File

@@ -76,7 +76,7 @@ var _ = Describe("speed", func() {
Expect(err).ToNot(HaveOccurred())
Expect(bytesRead).To(Equal(52)) // The A record response "127.0.0.1" is 52 bytes
}
elapsedSeconds := time.Now().Sub(startTime).Seconds()
elapsedSeconds := time.Since(startTime).Seconds()
Eventually(serverSession.Err).Should(Say(`TypeA 127-0-0-1\.sslip\.io\. \? 127\.0\.0\.1`))
//fmt.Fprintf(os.Stderr, "Queries/second: %.2f\n", float64(numQueries)/elapsedSeconds)
Expect(float64(numQueries) / elapsedSeconds).Should(BeNumerically(">", minThroughput))