Skip to content

rest ui: use default value instead of confusing placeholder#291

Merged
andybons merged 1 commit into
masterfrom
andybons/counter
Jan 26, 2015
Merged

rest ui: use default value instead of confusing placeholder#291
andybons merged 1 commit into
masterfrom
andybons/counter

Conversation

@andybons
Copy link
Copy Markdown
Contributor

Per #287, confusion could be caused by assuming that the input placeholder value ("0" in this cause) actually represents the value being passed, which isn’t true. Setting a default value to prevent this confusion in the future.

@tbg
Copy link
Copy Markdown
Member

tbg commented Jan 26, 2015

That's actually not the reason for #287. I entered "0", "+0", "-0" and "00" and they all end up with

[POST] 400 /kv/rest/counter/asd: could not parse int64 for increment: strconv.ParseInt: parsing "": invalid syntax

FWIW, that's Chromium right now, but I think I had FireFox at home, though I'm not sure.

@tbg
Copy link
Copy Markdown
Member

tbg commented Jan 26, 2015

(I wasn't able to test your commit, so your change still might have fixed it.)

@andybons
Copy link
Copy Markdown
Contributor Author

You’re running a non-stable Chromium channel?

@tbg
Copy link
Copy Markdown
Member

tbg commented Jan 26, 2015

No, don't think so.

18:15 $ /usr/bin/chromium --version
Chromium 39.0.2171.71 Built on 8.0, running on Debian 8.0

@andybons
Copy link
Copy Markdown
Contributor Author

OK. Well let’s merge this as it at least gives a better default and keep the issue open. If you find yourself in that position again, open up the Web Inspector and paste in what data is being sent with the request.

@tbg
Copy link
Copy Markdown
Member

tbg commented Jan 26, 2015

Yeah, go for it.
Network explorer shows a content-length 0 request. Will test again after your merge.

POST /kv/rest/counter/asd HTTP/1.1
Host: localhost:8080
Connection: keep-alive
Content-Length: 0
Accept: application/json, text/plain, */*
Origin: http://localhost:8080
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://localhost:8080/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: JSESSIONID.e3732d2c=1oqyspzpo7p0zbsv2419htjzi; JSESSIONID.176816f4=124gw4lm8dc7917ksxk6lexoqb; JSESSIONID.81daacb6=14s37wyula7b815eh42sltypc; JSESSIONID.4771515a=5lm2uvq8fkotv591zlhowv4b; JSESSIONID.8ab14d03=1bgxgykwqc1vq149f81ia2v1; JSESSIONID.f9172fe5=1haoff248m8davzk5kh2zgcb3; JSESSIONID.315000ac=17s3ztavb5uuq1o49wjwr40ka8; JSESSIONID.e2bfe0eb=xsclz18mdmof1wcgr8emg05fg; screenResolution=1920x1080

@cockroach-teamcity
Copy link
Copy Markdown
Member

🔴 Sysbench [SQL, 3node, oltp_read_write]
Metric Old Commit New Commit Delta Note
sec/op 9.425m ±4% 9.464m ±4% ~ p=0.567 n=15
🔴 allocs/op 6.293k ±0% 6.319k ±1% +0.41% p=0.000 n=15
Reproduce

benchdiff binaries:

mkdir -p benchdiff/b3efbc0/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/b3efbc0d6ee926bd3adc2d64f7dc83999ce6e46a/bin/pkg_sql_tests benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/83f228e/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/83f228e1af8ad84ef9866e0f1d7958a7e286297e/bin/pkg_sql_tests benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests

benchdiff command:

# NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/SQL/3node/oltp_read_write$ --old=83f228e --new=b3efbc0 --memprofile ./pkg/sql/tests
⚪ Sysbench [KV, 3node, oltp_read_only]
Metric Old Commit New Commit Delta Note
sec/op 3.122m ±1% 3.092m ±1% ~ p=0.106 n=15
allocs/op 2.102k ±0% 2.102k ±0% ~ p=0.738 n=15
Reproduce

benchdiff binaries:

mkdir -p benchdiff/b3efbc0/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/b3efbc0d6ee926bd3adc2d64f7dc83999ce6e46a/bin/pkg_sql_tests benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/83f228e/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/83f228e1af8ad84ef9866e0f1d7958a7e286297e/bin/pkg_sql_tests benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests

benchdiff command:

# NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_read_only$ --old=83f228e --new=b3efbc0 --memprofile ./pkg/sql/tests
⚪ Sysbench [KV, 3node, oltp_write_only]
Metric Old Commit New Commit Delta Note
sec/op 2.843m ±1% 2.846m ±1% ~ p=0.567 n=15
allocs/op 4.208k ±0% 4.206k ±0% ~ p=0.532 n=15
Reproduce

benchdiff binaries:

mkdir -p benchdiff/b3efbc0/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/b3efbc0d6ee926bd3adc2d64f7dc83999ce6e46a/bin/pkg_sql_tests benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/b3efbc0/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
mkdir -p benchdiff/83f228e/bin/1058449141
gcloud storage cp gs://cockroach-microbench-ci/builds/83f228e1af8ad84ef9866e0f1d7958a7e286297e/bin/pkg_sql_tests benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests
chmod +x benchdiff/83f228e/bin/1058449141/cockroachdb_cockroach_pkg_sql_tests

benchdiff command:

# NB: for best (most stable) results, also add a suitable `--benchtime` that
# results in ~1s to ~5s of benchmark runs. For example, if ops average ~3ms, a
# benchtime of `1000x` is appropriate.
#
# Some benchmarks (in particular BenchmarkSysbench) output additional memory
# profiles covering only the execution (excluding the setup/teardown) - those
# should be preferred for analysis since they more closely correspond to what's
# reported as B/op and alloc/op.
benchdiff --run=^BenchmarkSysbench/KV/3node/oltp_write_only$ --old=83f228e --new=b3efbc0 --memprofile ./pkg/sql/tests
Artifacts

download:

mkdir -p new
gcloud storage cp gs://cockroach-microbench-ci/artifacts/b3efbc0d6ee926bd3adc2d64f7dc83999ce6e46a/26867079019-1/\* new/
mkdir -p old
gcloud storage cp gs://cockroach-microbench-ci/artifacts/83f228e1af8ad84ef9866e0f1d7958a7e286297e/26867079019-1/\* old/

built with commit: b3efbc0d6ee926bd3adc2d64f7dc83999ce6e46a

@cockroach-teamcity cockroach-teamcity added the X-perf-check Microbenchmarks CI: Added to a PR if a performance regression is detected and should be checked label Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

X-perf-check Microbenchmarks CI: Added to a PR if a performance regression is detected and should be checked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants