aboutsummaryrefslogtreecommitdiff
path: root/serialize.go
AgeCommit message (Collapse)Author
2015-06-26fix panic based error reportingFumitoshi Ukai
2015-06-26unexport LogStatsFumitoshi Ukai
2015-06-26unexport EvalCommand, DumpDepGraphCacheFumitoshi Ukai
2015-06-26add LoadSaver for JSON, GOBFumitoshi Ukai
2015-06-25unexport Logf, LogAlways, Warn*, Error*Fumitoshi Ukai
2015-06-25unexport Func and ExprFumitoshi Ukai
2015-06-25unexport ReadMakefile and FileStateFumitoshi Ukai
2015-06-25unexport serialize/deserializeFumitoshi Ukai
2015-06-25unexport *VarFumitoshi Ukai
2015-06-25fix TestParaFumitoshi Ukai
unexport ValueType*
2015-06-25go gettable for github.com/google/katiFumitoshi Ukai
2015-06-19reduce string -> []byte conversion in Write and w.Write([]byte{x})Fumitoshi Ukai
use io.WriteString(w, str) instead of w.Write([]byte(str)) use writeByte(w, b) instead of w.Write([]byte{b})
2015-06-18split SimpleVar to SimpleVar and AutomaticVarFumitoshi Ukai
SimpleVar uses string, while AutomaticVar uses []byte
2015-06-18reduce runtime.convT2I -> runtime.newobject -> runtime.mallocgcFumitoshi Ukai
conversion from value to interface is more expensive than conversion from pointer to interface. package main import "testing" type I interface { String() string } type val struct { s string } func (v val) String() string { return v.s } type ptr struct { s string } func (p *ptr) String() string { return p.s } func BenchmarkT2IForValue(b *testing.B) { var intf I for i := 0; i < b.N; i++ { intf = val{"abc"} } _ = intf } func BenchmarkT2IForPtr(b *testing.B) { var intf I for i := 0; i < b.N; i++ { intf = &ptr{"abc"} } _ = intf } % go test -bench . a_test.go testing: warning: no tests to run PASS BenchmarkT2IForValue 20000000 90.9 ns/op BenchmarkT2IForPtr 20000000 76.8 ns/op ok command-line-arguments 3.539s
2015-06-10Add LICENSE and licence headersShinichiro Hamaji
2015-06-08use time.Since instead of time.Now().SubFumitoshi Ukai
count # of shell invocation. $ repo/android.sh kati -c -kati_stats ... *kati*: eval time: "59.179409898s" *kati*: shell func time: "40.99470661s" 2896 ... note that # of unique shell command lines seems to be 2514. from "$ repo/android.sh kati -c -kati_eval_stats" grep shell: | wc -l top $(shell ..); cumulative time > 1sec from "$ repo/android.sh kati -c -kati_eval_stats" count,longest(ns),total(ns),longest,total,name ... 1325,53941610,16717939038,53.94161ms,16.717939038s,func:$(shell if [ -d $1 ] ; then cd $1 ; find ./ -not -name '.*' -and -type f -and -not -type l ; fi) ... 922,37729941,13098517289,37.729941ms,13.098517289s,func:$(shell cd ${LOCAL_PATH} ; find -L $1 -name "*.java" -and -not -name ".*") ... 162,39814484,2716881896,39.814484ms,2.716881896s,func:$(shell cd ${TOP_DIR}${LOCAL_PATH}/${dir} && find . -type d -a -name ".svn" -prune -o -type f -a \! -name"*.java" -a \! -name "package.html" -a \! -name "overview.html" -a \! -name ".*.swp" -a \! -name ".DS_Store" -a \! -name "*~" -print ) ... 174,34637725,2245014340,34.637725ms,2.24501434s,func:$(shell echo $1 | tr 'a-zA-Z' 'n-za-mN-ZA-M') ... 1,1633210877,1633210877,1.633210877s,1.633210877s,func:$(shell build/tools/findleaves.py --prune=${OUT_DIR} --prune=.repo --prune=.git . CleanSpec.mk) ... note: $ time find repo/android -ls > /dev/null find repo/android -ls > /dev/null 2.33s user 2.04s system 100% cpu 4.366 total
2015-06-08fix go lint (except comment on exported fields, error message with punct)Fumitoshi Ukai
ast.go:70:1: comment on exported type MaybeRuleAST should be of the form "MaybeRuleAST ..." (with optional leading article) eval.go:241:1: comment on exported method Evaluator.EvaluateVar should be of the form "EvaluateVar ..." eval.go:14:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:15:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:16:2: don't use ALL_CAPS in Go names; use CamelCase eval.go:431:2: don't use underscores in Go names; var makefile_list should be makefileList main.go:29:2: var loadJson should be loadJSON main.go:30:2: var saveJson should be saveJSON ninja.go:19:2: struct field ruleId should be ruleID para.go:15:9: if block ends with a return statement, so drop this else and outdent its block para_test.go:21:2: don't use underscores in Go names; var num_tasks should be numTasks parser.go:713:1: error should be the last type when returning multiple items serialize.go:20:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:21:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:22:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:23:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:24:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:25:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:26:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:27:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:28:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:29:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:30:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:31:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:32:2: don't use ALL_CAPS in Go names; use CamelCase serialize.go:230:6: func DumpDepGraphAsJson should be DumpDepGraphAsJSON serialize.go:553:6: func LoadDepGraphFromJson should be LoadDepGraphFromJSON serialize.go:437:9: if block ends with a return statement, so drop this else and outdent its block var.go:174:1: receiver name should not be an underscore var.go:175:1: receiver name should not be an underscore var.go:176:1: receiver name should not be an underscore var.go:177:1: receiver name should not be an underscore var.go:178:1: receiver name should not be an underscore var.go:180:1: receiver name should not be an underscore var.go:183:1: receiver name should not be an underscore var.go:187:1: receiver name should not be an underscore var.go:191:1: receiver name should not be an underscore
2015-06-08fix go vetFumitoshi Ukai
serialize.go:361: unreachable code serialize.go:415: arg o for printf verb %s of wrong type: int serialize.go:422: arg o for printf verb %s of wrong type: int worker.go:354: unreachable code ninja_test.go:134: missing argument for Errorf("%q"): format reads arg 2, have only 1 args rule_parser_test.go:160: arg *got for printf verb %q of wrong type: main.Rule
2015-06-02fix readFile - fd leakFumitoshi Ukai
use ioutil.ReadFile instead. exists uses os.Stat and os.IsNotExist
2015-06-02close after os.Open, os.CreateFumitoshi Ukai
2015-05-29Serialize exported variablesShinichiro Hamaji
2015-05-26Use SHA1 hash instead of content for cacheShinichiro Hamaji
2015-05-25Show the statistics for read makefilesShinichiro Hamaji
2015-05-25Show spent time for cache lookupShinichiro Hamaji
2015-05-25Handle cache based on their contents instead of timestampsShinichiro Hamaji
2015-05-20Introduce a hack for Android build to let cache hitShinichiro Hamaji
2015-05-20Check the timestamp of cacheShinichiro Hamaji
2015-05-20Check the timestamp of cacheShinichiro Hamaji
2015-05-20Add --use_cache flagShinichiro Hamaji
2015-05-20Serialize read/missing makefilesShinichiro Hamaji
2015-05-19Stop outputting serialize.profShinichiro Hamaji
This was an unintentional change.
2015-05-19Save root targets in serializerShinichiro Hamaji
2015-05-15Do not use gob to create unqiue ID for each varsShinichiro Hamaji
Now serialization is 5 times faster (41 secs => 8 secs).
2015-05-14Add parents to DepNodeShinichiro Hamaji
2015-05-12Do not serialize the same target names multiple timesShinichiro Hamaji
126MB => 51MB
2015-05-12Show stats around serialized variablesShinichiro Hamaji
2015-04-28Do not serialize duplicated TSVs multiple timesShinichiro Hamaji
2015-04-28Deserialize tmpval and varsubstShinichiro Hamaji
2015-04-28Do not emit duplicated TSVs to serialized dataShinichiro Hamaji
15GB => 126MB
2015-04-28Re-format codeShinichiro Hamaji
2015-04-28Add -save and -load optionsShinichiro Hamaji
2015-04-28Fix all serializationShinichiro Hamaji
2015-04-28Deserialize more typesShinichiro Hamaji
2015-04-28Deserialize varsShinichiro Hamaji
2015-04-28Start implementing deserializerShinichiro Hamaji
2015-04-28Make it possible to serialize varsShinichiro Hamaji
2015-04-27Add an option to serialize eval resultShinichiro Hamaji