diff --git a/bench/go.mod b/bench/go.mod index 724cc9ee6..46747805e 100644 --- a/bench/go.mod +++ b/bench/go.mod @@ -2,13 +2,11 @@ module github.com/isucon/isucon11-qualify/bench go 1.16 -replace github.com/isucon/isucon11-qualify/extra/initial-data => ../extra/initial-data - require ( github.com/dgrijalva/jwt-go v3.2.0+incompatible + github.com/docker/docker v20.10.7+incompatible github.com/emirpasic/gods v1.12.0 github.com/google/uuid v1.2.0 github.com/isucon/isucandar v0.0.0-20210706075559-501b2c3ed1da - github.com/isucon/isucon11-qualify/extra/initial-data v0.0.0-00010101000000-000000000000 github.com/labstack/echo v3.3.10+incompatible ) diff --git a/bench/go.sum b/bench/go.sum index d26c115a7..afb004aa0 100644 --- a/bench/go.sum +++ b/bench/go.sum @@ -11,13 +11,10 @@ github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5Jflh github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg= github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/isucon/isucandar v0.0.0-20210706075559-501b2c3ed1da h1:ketVg/zviLdKsU1BtjX6b+uc94Wkns2aOuTypm1GBsw= github.com/isucon/isucandar v0.0.0-20210706075559-501b2c3ed1da/go.mod h1:B9L4o5rIoL2dKdHHVOFih3sZN1EfUFPtteVcSR5z1xw= -github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= @@ -26,13 +23,11 @@ github.com/labstack/echo v3.3.10+incompatible h1:pGRcYk231ExFAyoAjAfD85kQzRJCRI8 github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= github.com/labstack/gommon v0.3.0 h1:JEeO0bvc78PKdyHxloTKiF8BD5iGrH8T6MSeGvSgob0= github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= -github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/mattn/go-colorable v0.1.2 h1:/bC9yWikZXAL9uJdulbSfyVNIR3n3trXl+v8+1sx8mU= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.9 h1:d5US/mDsogSGW37IV293h//ZFaeajb69h+EHFsv2xGg= github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= -github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pquerna/cachecontrol v0.0.0-20200819021114-67c6ae64274f h1:JDEmUDtyiLMyMlFwiaDOv2hxUp35497fkwePcLeV7j4= diff --git a/bench/model/isu.go b/bench/model/isu.go index ec4deca3b..ad00183e6 100644 --- a/bench/model/isu.go +++ b/bench/model/isu.go @@ -4,7 +4,7 @@ import ( "context" "github.com/google/uuid" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) //enum diff --git a/bench/model/user.go b/bench/model/user.go index f9f0392b4..3aa1a0623 100644 --- a/bench/model/user.go +++ b/bench/model/user.go @@ -4,7 +4,7 @@ import ( "context" "github.com/isucon/isucandar/agent" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) //enum diff --git a/extra/initial-data/random/catalog_id.go b/bench/random/catalog_id.go similarity index 100% rename from extra/initial-data/random/catalog_id.go rename to bench/random/catalog_id.go diff --git a/extra/initial-data/random/character.go b/bench/random/character.go similarity index 100% rename from extra/initial-data/random/character.go rename to bench/random/character.go diff --git a/extra/initial-data/random/condition.go b/bench/random/condition.go similarity index 100% rename from extra/initial-data/random/condition.go rename to bench/random/condition.go diff --git a/extra/initial-data/random/global.go b/bench/random/global.go similarity index 100% rename from extra/initial-data/random/global.go rename to bench/random/global.go diff --git a/extra/initial-data/random/image.go b/bench/random/image.go similarity index 100% rename from extra/initial-data/random/image.go rename to bench/random/image.go diff --git a/extra/initial-data/random/isu_name.go b/bench/random/isu_name.go similarity index 100% rename from extra/initial-data/random/isu_name.go rename to bench/random/isu_name.go diff --git a/extra/initial-data/random/message.go b/bench/random/message.go similarity index 100% rename from extra/initial-data/random/message.go rename to bench/random/message.go diff --git a/extra/initial-data/random/time.go b/bench/random/time.go similarity index 100% rename from extra/initial-data/random/time.go rename to bench/random/time.go diff --git a/extra/initial-data/random/user_name.go b/bench/random/user_name.go similarity index 100% rename from extra/initial-data/random/user_name.go rename to bench/random/user_name.go diff --git a/bench/scenario/action.go b/bench/scenario/action.go index 7d168a1cf..abc50efe1 100644 --- a/bench/scenario/action.go +++ b/bench/scenario/action.go @@ -26,7 +26,7 @@ import ( "github.com/isucon/isucandar/failure" "github.com/isucon/isucon11-qualify/bench/logger" "github.com/isucon/isucon11-qualify/bench/service" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) const ( diff --git a/bench/scenario/prepare.go b/bench/scenario/prepare.go index 8c4ef9ec7..213dbd15c 100644 --- a/bench/scenario/prepare.go +++ b/bench/scenario/prepare.go @@ -13,7 +13,7 @@ import ( "github.com/isucon/isucandar/worker" "github.com/isucon/isucon11-qualify/bench/logger" "github.com/isucon/isucon11-qualify/bench/service" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) func (s *Scenario) Prepare(ctx context.Context, step *isucandar.BenchmarkStep) error { diff --git a/extra/initial-data/go.mod b/extra/initial-data/go.mod index d483bd647..c8005072d 100644 --- a/extra/initial-data/go.mod +++ b/extra/initial-data/go.mod @@ -3,8 +3,10 @@ module github.com/isucon/isucon11-qualify/extra/initial-data go 1.16 require ( - github.com/docker/docker v20.10.7+incompatible github.com/go-sql-driver/mysql v1.6.0 github.com/google/uuid v1.2.0 + github.com/isucon/isucon11-qualify/bench v0.0.0-00010101000000-000000000000 github.com/jmoiron/sqlx v1.3.4 ) + +replace github.com/isucon/isucon11-qualify/bench => ../../bench diff --git a/extra/initial-data/go.sum b/extra/initial-data/go.sum index c1c24f3ab..1fdc9f60b 100644 --- a/extra/initial-data/go.sum +++ b/extra/initial-data/go.sum @@ -1,13 +1,50 @@ +github.com/andybalholm/brotli v1.0.0/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/docker/docker v20.10.7+incompatible h1:Z6O9Nhsjv+ayUEeI1IojKbYcsGdgYSNqxe1s2MYzUhQ= github.com/docker/docker v20.10.7+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= +github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= +github.com/isucon/isucandar v0.0.0-20210706075559-501b2c3ed1da/go.mod h1:B9L4o5rIoL2dKdHHVOFih3sZN1EfUFPtteVcSR5z1xw= github.com/jmoiron/sqlx v1.3.4 h1:wv+0IJZfL5z0uZoUjlpKgHkgaFSYD+r9CfrXjEXsO7w= github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXLBMCQ= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= +github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= +github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/labstack/echo v3.3.10+incompatible/go.mod h1:0INS7j/VjnFxD4E2wkz67b8cVwCLbBmJyDaka6Cmk1s= +github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k= github.com/lib/pq v1.2.0 h1:LXpIM/LZ5xGFhOpXAQUIMM1HdyqzVYM13zNdjCEEcA0= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ= github.com/mattn/go-sqlite3 v1.14.6 h1:dNPt6NO46WmLVt2DLNpwczCmdV5boIZ6g/tlDrlRUbg= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/pquerna/cachecontrol v0.0.0-20200819021114-67c6ae64274f/go.mod h1:hoLfEwdY11HjRfKFH6KqnPsfxlo3BP6bJehpDv8t6sQ= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= +github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= +github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= +github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20200904194848-62affa334b73/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/extra/initial-data/models/condition.go b/extra/initial-data/models/condition.go index a75f2cc57..0a7f1c562 100644 --- a/extra/initial-data/models/condition.go +++ b/extra/initial-data/models/condition.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) type Condition struct { diff --git a/extra/initial-data/models/isu.go b/extra/initial-data/models/isu.go index d00ec979a..e58601f28 100644 --- a/extra/initial-data/models/isu.go +++ b/extra/initial-data/models/isu.go @@ -8,7 +8,7 @@ import ( "github.com/google/uuid" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) type Isu struct { diff --git a/extra/initial-data/models/user.go b/extra/initial-data/models/user.go index a8fa79c22..2d51863e1 100644 --- a/extra/initial-data/models/user.go +++ b/extra/initial-data/models/user.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/isucon/isucon11-qualify/extra/initial-data/random" + "github.com/isucon/isucon11-qualify/bench/random" ) type User struct {