Skip to content

Commit

Permalink
prepare for Isucon 10 qualify
Browse files Browse the repository at this point in the history
  • Loading branch information
yukikurage committed Jul 12, 2022
1 parent 02dd0fa commit 49661d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 3 additions & 3 deletions aws/aws.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
)

const (
imageId = string("ami-0796be4f4814fc3d5") // isucon競技用サーバーのAMI
InstanceType = types.InstanceTypeT2Medium // isuconサーバーの種類(競技ごとにスペックが違う)
imageId = string("ami-03bbe60df80bdccc0") // isucon競技用サーバーのAMI
InstanceType = types.InstanceTypeT2Small // isuconサーバーの種類(競技ごとにスペックが違う)
region = string("ap-northeast-1") // isuconサーバーのリージョン
)

Expand Down Expand Up @@ -77,7 +77,7 @@ useradd -m isucon
echo "%s\n%s\n" | passwd isucon
usermod -G sudo isucon
sed -e "s/PasswordAuthentication no/PasswordAuthentication yes/g" -i /etc/ssh/sshd_config
systemctl restart sshd
systemctl restart sshd
`, pwd, pwd)
enc := base64.StdEncoding.EncodeToString([]byte(startUpScript))
nispec := types.InstanceNetworkInterfaceSpecification{
Expand Down
7 changes: 1 addition & 6 deletions router/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ import (
"log"
"math/rand"
"net/http"
"os"
"strconv"
"strings"

"github.com/labstack/echo/v4"
"github.com/traPtitech/piscon-portal/model"
Expand Down Expand Up @@ -51,10 +49,7 @@ func genPassword() string {
func formatCommand(ip string, allAddresses []string) string {
// TODO: target, all-addressesを環境変数で渡すようにする
return fmt.Sprintf("/bench/bench "+
"-tls "+
"-target=%s "+
"-all-addresses=%s "+
"-jia-service-url=http://%s:5000", ip, strings.Join(allAddresses, ","), os.Getenv("BENCH_PRIVATE_IP"))
"--target-url=%s ", ip)
}

func (h *Handlers) GetNewer(c echo.Context) error {
Expand Down

0 comments on commit 49661d5

Please sign in to comment.