-
Notifications
You must be signed in to change notification settings - Fork 128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CloudFlare blocks request to simple test with no external resources #524
Comments
changing the setup variable name to jklfjdslkfj fixed it: https://jsperf.com/two-comma-separated-values-split-vs-substring what the hell man, cloudflare is stupid |
Just to confirm, you changed |
I have been blocked as well. Preparation Code: <script>
function createRandomString() {
const text = "";
const possible = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
for (let i = 0; i < 5; i++) {
text += possible.charAt(Math.floor(Math.random() * possible.length));
}
return text;
}
Benchmark.prototype.setup = function () {
const emptyMap = new Map();
const emptyObj = {};
const map = new Map();
const obj = {};
const predefinedKey = createRandomString();
const predefinedVal = createRandomString();
for (let i = 0; i < 1000; i++) {
const key = createRandomString();
const val = createRandomString();
map.set(key, val);
obj[key] = val;
}
};
</script> Code snippet 1: emptyMap.set(predefinedKey, predefinedVal); Code snippet 2: emptyObj[predefinedKey] = predefinedVal; Code snippet 3: for (let key of map.keys()) {
const val = map.get(key);
} Code snippet 4: for (let key of Object.keys(obj)) {
const val = obj[key];
} |
I have just been blocked trying to create a benchmark with the following code: Preparation code: <script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.15/lodash.core.min.js"></script>
<script>
// from: https://stackoverflow.com/a/43044212/613198
_.insertSorted = (a, v) => a.splice(_.sortedIndex(a, v), 0, v);
_.insertSortedBy = (a, v, i) => a.splice(_.sortedIndexBy(a, v, i), 0, v);
</script> Setup for all tests: let inputArray = [
{
"id": "06BCCC25",
"displayName":"Application"
},
{
"id": "39F886D9",
"displayName":"Communication"
},
{
"id": "22EA4ED5",
"displayName":"Device"
},
{
"id": "2F6E5FEA",
"displayName":"Service"
},
{
"id": "317BF72C", "displayName":"Service02"
}
];
let newValue = {
"id": "07BSSC25",
"displayName":"Mail"
}; I've been using jsPerf for many years and it would be a pity if I had to look around for an alternative. I would suggest checking what CDN or DDoS protection, if any, is used by:
because this has never happened to me on those websites. |
I was also blocked doing nothing out of the ordinary. Just loading jquery and fomantic-ui. |
CloudFlare is blocking access to adding a very simple test case.
When trying to submit the test, a screen similar to LuKks on #518 (comment) is shown.
I opened this issue after searching reading existing issues because this one is not related to jQuery (#518, #522) or any external scripts, and i'm not using
concat
(#68, #345) and striked me as odd since the setup is so simple. Additionally, this test only includes "core javascript" and no libraries or frameworks, contradicting this comment.Quoting asilluron, from #518 (comment):
I'm certain
substring
andsplit
have been part of javascript for at least 20+ years. One could argueconst
is an issue, but according to mathiasbynens on issue 345,Other comment on #519 argues that its out of jsperf's control because blocking scripts is working as intended, but as previously stated I don't have any.
The CloudFlare screen says to tell the site owner what I was doing and the "Ray ID":
56e3fd578d4580ce
Steps to reproduce
two comma separated values: split vs substring
const str = 'foo,bar';
substring
andsplit
respectively.First code snippet:
Second code snippet:
Environment
I run Chromium 75 on Windows. I don't have any browser extensions (yes, not even adblocker). My ip isn't hated by CloudFlare either, I can interact with other cf sites just fine.
The text was updated successfully, but these errors were encountered: