Comments (6)
Just to confirm, you changed str
to jklfjdslkfj
?
from jsperf.com.
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
from jsperf.com.
Yes (well, close). I changed str
to jfdlksj
and successfully submitted:
I replaced all instances of str
with jfdlksj
in the setup, test case 1 and test case 2, and successfully bypassed CloudFlare's block.
from jsperf.com.
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];
}
from jsperf.com.
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 don't think using Cloudflare can really work for this sort of project because I believe it is blocking me because I enter JavaScript in text fields and it thinks I'm trying to make a XSS or similar attack.
In fact I will have to stop using jsPerl until it is resolved, because even if some people here suggested changing variable names to fool the Cloudflare's attack detection, I don't want to be flagged by Cloudflare as someone who attacks websites.
I would suggest checking what CDN or DDoS protection, if any, is used by:
- JSBin
- jsFiddle
- CodePen
because this has never happened to me on those websites.
from jsperf.com.
I was also blocked doing nothing out of the ordinary. Just loading jquery and fomantic-ui.
from jsperf.com.
Related Issues (20)
- CloudFlare block HOT 1
- CloudFlare Blocked HOT 1
- submitting or editing any test results in a 400 - "Please review required fields and save again." HOT 1
- Add the ability to remove snippets
- Error 500 after posting a comment.
- Browserscope Dead?
- Zeit is now Vercel
- Zeit 1.0 is being shut down HOT 1
- Front-end redesign HOT 3
- [IMPORTANT] Migrate from Zeit 1.0 config to Vercel config HOT 6
- jsperf.com returning 502s HOT 30
- π₯Site down HOT 3
- The website can't be opened. HOT 4
- Deployment failed - site not working HOT 1
- Site down again
- Site down, hosting issues HOT 3
- Please give us a dump of the perfs if you are clearly going to abandon this HOT 2
- How to get API Key in "Browserscope" ?
- Site down HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jsperf.com.