From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Thu, 12 Nov 2020 16:03:28 +0100
Subject: Disable once-to-stdout-delay command flag

Forwarded: not-needed

This flag would require vendoring / patching in another insignificant package,
so instead we simply disable it for now.
---
 cmd/process-exporter/main.go | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/cmd/process-exporter/main.go b/cmd/process-exporter/main.go
index 5498a66..2cbf20b 100644
--- a/cmd/process-exporter/main.go
+++ b/cmd/process-exporter/main.go
@@ -14,7 +14,6 @@ import (
 	"syscall"
 	"time"
 
-	"github.com/ncabatoff/fakescraper"
 	common "github.com/ncabatoff/process-exporter"
 	"github.com/ncabatoff/process-exporter/collector"
 	"github.com/ncabatoff/process-exporter/config"
@@ -154,8 +153,6 @@ func main() {
 			"Address on which to expose metrics and web interface.")
 		metricsPath = flag.String("web.telemetry-path", "/metrics",
 			"Path under which to expose metrics.")
-		onceToStdoutDelay = flag.Duration("once-to-stdout-delay", 0,
-			"Don't bind, just wait this much time, print the metrics once to stdout, and exit")
 		procNames = flag.String("procnames", "",
 			"comma-separated list of process names to monitor")
 		procfsPath = flag.String("procfs", "/proc",
@@ -261,17 +258,6 @@ func main() {
 
 	prometheus.MustRegister(pc)
 
-	if *onceToStdoutDelay != 0 {
-		// We throw away the first result because that first collection primes the pump, and
-		// otherwise we won't see our counter metrics.  This is specific to the implementation
-		// of NamedProcessCollector.Collect().
-		fscraper := fakescraper.NewFakeScraper()
-		fscraper.Scrape()
-		time.Sleep(*onceToStdoutDelay)
-		fmt.Print(fscraper.Scrape())
-		return
-	}
-
 	sigs := make(chan os.Signal, 1)
 	signal.Notify(sigs, syscall.SIGTERM, syscall.SIGINT)
 
