Giter Club home page Giter Club logo

Comments (19)

ryankirkman avatar ryankirkman commented on May 6, 2024

That's something we've been working on for a while now.

The data isn't ready just yet, but in the very near future that should change.

from cdnjs.

paulirish avatar paulirish commented on May 6, 2024

Sounds good!

I'm excited. :)

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

We have stats, just figuring out an efficient log parsing strategy. After that's complete I will most likely serve the data on a Restful call /statistics?start=DATE&end=DATE

which will return [
{ library: 'backbone', hits: 10000},
{ library: 'jquery', hits: 24}....
]

I will expose the call with CORS for all host and throw up a simple UI to peruse the stats by date.

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

Hey guys, heres an update, looking for feedback.

I have stats running at http://stats.cdnjs.com by default it shows todays stats which get parsed every 6 hours.

  • CORS enabled to *

You can access historic data by using the to and from query string parameters.

The query parameters take any valid Date.js(http://www.datejs.com/) value.

to and from both default to current date if not specified

So for example
Todays - http://stats.cdnjs.com
Yesterdays - http://stats.cdnjs.com/?to=yesterday&from=yesterday
Total of last week - http://stats.cdnjs.com/?from=last%20week

etc etc

date.js takes a decent amount of options.

Just ironing out bugs and taking feedback at the moment

Note: The database is only storing, from 25th-ish onwards.

from cdnjs.

webignition avatar webignition commented on May 6, 2024

Looks great so far.

I'm a little curious why each library's stats are presented as an object wrapped in an array like this:

"jquery": [
    {
        "date": "29/9/2012",
        "hits": "771236"
    }
]

instead of without an array, like this:

"jquery": {
    "date": "29/9/2012",
    "hits": "771236"
}

The array seems unnecessary, just wondering why, not that it really matters.

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

@webignition if you select a date range that is larger than 1 day, the dates will appear in the array. Does that help?

from cdnjs.

webignition avatar webignition commented on May 6, 2024

Yes, that helps. It makes much more sense now. Thanks!

from cdnjs.

presidento avatar presidento commented on May 6, 2024

It would be better to use the ISO 8601 date format, especially for foreigns, and it is parseable in every environment.

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

put stats on the homepage http://cdnjs.com

also only library specific stats will ever be shown, need to draw up a terms of service that states we will never disclose information about particular websites

from cdnjs.

codler avatar codler commented on May 6, 2024

Suggestion: Show number of unique websites that are using.


Will there be statistic by version?


Make the value on "hits" to int in json string.

from cdnjs.

blaise-io avatar blaise-io commented on May 6, 2024

http://stats.cdnjs.com is timing out a lot.

from cdnjs.

niyazpk avatar niyazpk commented on May 6, 2024

Looks like we need an uptime stats page for the stats page :)

from cdnjs.

codler avatar codler commented on May 6, 2024

How is it going with the stats? http://stats.cdnjs.com seems down.

from cdnjs.

gfranko avatar gfranko commented on May 6, 2024

I would love to see stats for the cdn.js hosted libraries. Any updates on this?

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

Hey guys,

we do have access to the logs in common log format (http://en.wikipedia.org/wiki/Common_Log_Format)

But we were struggling with putting together a cost efficient solution to parse them.

So for example http://www.s3stat.com/Pricing.aspx does $300 for ~5million hits a day whereas we could potentially be getting around ~15-30 million per day.

So my thoughts is to get an EC2 instance that parses them continuously and post the aggregate values for each day to a mysql database. (library, version, hits, date)

from cdnjs.

gfranko avatar gfranko commented on May 6, 2024

How were you parsing the data with the http://stats.cdnjs.com API?

from cdnjs.

thomasdavis avatar thomasdavis commented on May 6, 2024

Same as my solution in the previous comment. But it was buggy so wanted to rewrite the parser.

from cdnjs.

gfranko avatar gfranko commented on May 6, 2024

Gotcha, that makes sense. Let me know if you want any help with the UI.

from cdnjs.

ryankirkman avatar ryankirkman commented on May 6, 2024

Discussion moved to #1078

from cdnjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.