Skip to content

Commit 3d8f5da

Browse files
Evgenii Slutckiijenkins
Evgenii Slutckii
authored and
jenkins
committed
adding timestamps to troubleshoot scoot
- removing --jobs 1 for scoot that slows down CI a lot - adding timestamps to multiple places to troubleshoot bazel execution - removing search python client as it is not used anywhere in source and python client generation is too memory heavy, so removing it in the hope no one cares. See details: https://twitter.slack.com/archives/C88ET33MZ/p1733186503428609?thread_ts=1732760492.572859&cid=C88ET33MZ Differential Revision: https://phabricator.twitter.biz/D1185430
1 parent 5ead807 commit 3d8f5da

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

scrooge-generator/src/main/scala/com/twitter/scrooge/Compiler.scala

+12-2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ import com.twitter.scrooge.java_generator.ApacheJavaGenerator
2828

2929
import java.io.File
3030
import java.io.FileWriter
31+
import java.time.format.DateTimeFormatter
32+
import java.time.LocalDateTime
3133
import scala.collection.concurrent.TrieMap
3234

3335
object CompilerDefaults {
@@ -37,6 +39,8 @@ object CompilerDefaults {
3739

3840
class Compiler(val config: ScroogeConfig) {
3941
var fileMapWriter: scala.Option[FileWriter] = None
42+
// Optionally, format the timestamp if needed
43+
val formatter: DateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")
4044

4145
def run(): Unit = {
4246
// if --gen-file-map is specified, prepare the map file.
@@ -74,7 +78,10 @@ class Compiler(val config: ScroogeConfig) {
7478
)
7579
val doc = parser.parseFile(inputFile).mapNamespaces(config.namespaceMappings)
7680

77-
if (config.verbose) println("+ Compiling %s".format(inputFile))
81+
if (config.verbose) {
82+
val currentDateTime: LocalDateTime = LocalDateTime.now()
83+
println("+ %s Compiling %s".format(currentDateTime.format(formatter), inputFile))
84+
}
7885
val resolvedDoc = TypeResolver()(doc, Some(inputFile))
7986
val generator =
8087
GeneratorFactory(
@@ -98,7 +105,10 @@ class Compiler(val config: ScroogeConfig) {
98105
_.getPath
99106
}
100107
if (config.verbose) {
101-
println("+ Generated %s".format(generatedFiles.mkString(", ")))
108+
val currentDateTime: LocalDateTime = LocalDateTime.now()
109+
println(
110+
"+ %s Generated %s"
111+
.format(currentDateTime.format(formatter), generatedFiles.mkString(", ")))
102112
}
103113
fileMapWriter.foreach { w =>
104114
generatedFiles.foreach { path => w.write(inputFile + " -> " + path + "\n") }

0 commit comments

Comments
 (0)