diff --git a/SCC-OUTPUT-REPORT.html b/SCC-OUTPUT-REPORT.html index ecd2ee4ef..80d5a647c 100644 --- a/SCC-OUTPUT-REPORT.html +++ b/SCC-OUTPUT-REPORT.html @@ -13,13 +13,13 @@ Go 27 - 9578 - 1462 + 9584 + 1464 447 - 7669 + 7673 1413 - 255158 - 4126 + 255459 + 4128 processor/workers_test.go @@ -33,13 +33,13 @@ processor/formatters.go - 1517 + 1519 208 39 - 1270 + 1272 163 - 44230 - 784 + 44361 + 785 processor/formatters_test.go @@ -93,13 +93,13 @@ cmd/badges/main.go - 374 + 375 60 17 - 297 + 298 59 - 9571 - 239 + 9660 + 240 processor/workers_tokei_test.go @@ -213,13 +213,13 @@ scripts/include.go - 84 - 16 + 87 + 18 9 - 59 + 60 19 - 2207 - 62 + 2288 + 63 processor/filereader.go @@ -294,15 +294,15 @@ Total 27 - 9578 - 1462 + 9584 + 1464 447 - 7669 + 7673 1413 - 255158 - 4126 + 255459 + 4128 - Estimated Cost to Develop (organic) $229,388
Estimated Schedule Effort (organic) 7.86 months
Estimated People Required (organic) 2.59
+ Estimated Cost to Develop (organic) $229,513
Estimated Schedule Effort (organic) 7.86 months
Estimated People Required (organic) 2.59
\ No newline at end of file diff --git a/cmd/badges/main.go b/cmd/badges/main.go index 138307457..31634921c 100644 --- a/cmd/badges/main.go +++ b/cmd/badges/main.go @@ -2,7 +2,6 @@ package main import ( "context" - "encoding/json" "errors" "fmt" "math" @@ -17,6 +16,7 @@ import ( "time" "github.com/boyter/scc/v3/processor" + jsoniter "github.com/json-iterator/go" "github.com/rs/zerolog/log" ) @@ -25,6 +25,7 @@ var ( cache = NewSimpleCache(1000, 86400) countingSemaphore = make(chan bool, 1) tmpDir = os.TempDir() + json = jsoniter.ConfigCompatibleWithStandardLibrary ) func main() { diff --git a/processor/formatters.go b/processor/formatters.go index e73854599..bcde7563d 100644 --- a/processor/formatters.go +++ b/processor/formatters.go @@ -6,7 +6,6 @@ import ( "bytes" "cmp" "encoding/csv" - "encoding/json" "fmt" "math" "os" @@ -17,6 +16,7 @@ import ( "strings" "time" + jsoniter "github.com/json-iterator/go" "github.com/mattn/go-runewidth" glanguage "golang.org/x/text/language" @@ -244,6 +244,7 @@ func toJSON(input chan *FileJob) string { language := aggregateLanguageSummary(input) language = sortLanguageSummary(language) + json := jsoniter.ConfigCompatibleWithStandardLibrary jsonString, _ := json.Marshal(language) if Debug { @@ -272,6 +273,7 @@ func toJSON2(input chan *FileJob) string { cost, schedule, people := esstimateCostScheduleMonths(sumCode) + json := jsoniter.ConfigCompatibleWithStandardLibrary jsonString, _ := json.Marshal(Json2{ LanguageSummary: language, EstimatedCost: cost, diff --git a/scripts/include.go b/scripts/include.go index f4e424346..c96f3d235 100644 --- a/scripts/include.go +++ b/scripts/include.go @@ -6,15 +6,18 @@ import ( "bytes" "compress/gzip" "encoding/base64" - "encoding/json" "fmt" "io" "os" "strings" + + jsoniter "github.com/json-iterator/go" ) const constantsFile = "./processor/constants.go" +var json = jsoniter.ConfigCompatibleWithStandardLibrary + // Reads all .json files in the current folder // and encodes them as strings literals in constants.go func generateConstants() error {