Code Monkey home page Code Monkey logo

http4s / frameworkbenchmarks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from techempower/frameworkbenchmarks

0.0 0.0 0.0 265.67 MB

Source code for the framework benchmarking project

Home Page: http://www.techempower.com/benchmarks/

License: Other

Ruby 4.41% Shell 10.84% Makefile 0.16% C++ 3.28% CMake 0.30% Nginx 5.52% QMake 0.11% HTML 7.08% C 7.22% C# 11.40% PowerShell 1.72% Python 13.45% ASP 0.04% CSS 8.78% JavaScript 19.97% Clojure 2.73% Crystal 0.26% D 0.45% Dart 1.73% Elixir 0.55%

frameworkbenchmarks's Introduction

Http4s Build Status Maven Central Typelevel library Cats friendly

Http4s is a minimal, idiomatic Scala interface for HTTP services. Http4s is Scala's answer to Ruby's Rack, Python's WSGI, Haskell's WAI, and Java's Servlets.

val http = HttpRoutes.of {
  case GET -> Root / "hello" =>
    Ok("Hello, better world.")
}

Learn more at http4s.org.

If you run into any difficulties please enable partial unification in your build.sbt (not needed for Scala 2.13 and beyond, because Scala 2.13.0+ has partial unification switched on by default)

scalacOptions ++= Seq("-Ypartial-unification")

Requirements

Running the blaze backend requires a modern, supported version of the JVM to build and run, as it relies on server APIs unavailable before JDK8u252. Any JDK newer than JDK8u252, including 9+ is supported.

Code of Conduct

http4s is proud to be a Typelevel project. We are committed to providing a friendly, safe and welcoming environment for all, and ask that the community adhere to the Scala Code of Conduct.

License

This software is licensed under the Apache 2 license, quoted below.

Copyright 2013-2021 http4s [https://http4s.org]

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

[http://www.apache.org/licenses/LICENSE-2.0]

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Acknowledgments

YourKit

Special thanks to YourKit for supporting this project's ongoing performance tuning efforts with licenses to their excellent product.

frameworkbenchmarks's People

Contributors

aschneider-techempower avatar ashawnbandy-te-tfb avatar ebramanti-techempower avatar fernandoacorreia avatar hamiltont avatar huntc avatar jaguililla avatar jyentechempower avatar knewmante avatar kppullin avatar ladymozzarella avatar lgratrix-techempower avatar lhotari avatar ludovic-gasc avatar malcolmevershed avatar marko-asplund avatar martin-g avatar methane avatar michaelhixson avatar msmith-techempower avatar natebrady23 avatar oberhamsi avatar pdonald avatar pfalls-techempower avatar pfalls1 avatar robfig avatar ssmith-techempower avatar valyala avatar yogthos avatar zane-techempower avatar

Watchers

 avatar  avatar

frameworkbenchmarks's Issues

Use ScalaTags

While We Will Need to Run Benchmarks on Both, Scalatags states that it has performance improvements over Twirl.

We should put these to the test and see if it improves rendering time at all. This is primarily for the fortunes test. We have the database configuration already being investigated, this is looking into the server-side HTML template component

Fortunes

Requirements

In this test, the framework's ORM is used to fetch all rows from a database table containing an unknown number of Unix fortune cookie messages (the table has 12 rows, but the code cannot have foreknowledge of the table's size). An additional fortune cookie message is inserted into the list at runtime and then the list is sorted by the message text. Finally, the list is delivered to the client using a server-side HTML template. The message text must be considered untrusted and properly escaped and the UTF-8 fortune messages must be rendered properly.

Whitespace is optional and may comply with the framework's best practices.

Our Results

8 16 32 64 128 256
9,211 17,371 35,716 52,744 55,188 55,674

Fortunes responses per second

Database Performance Improvements

On the recent run we had some rather odd performance on our database queries.

We run a HikariCP pool of 256, other run much smaller pools. Recommendation I found from HikariCP was

connections = ((core_count * 2) + effective_spindle_count)

Data Updates

Requirements Summary

This test exercises database writes. Each request is processed by fetching multiple rows from a simple database table, converting the rows to in-memory objects, modifying one attribute of each object in memory, updating each associated row in the database individually, and then serializing the list of objects as a JSON response. The test is run multiple times: testing 1, 5, 10, 15, and 20 updates per request. Note that the number of statements per request is twice the number of updates since each update is paired with one query to fetch the object. All tests are run at 256 concurrency

Our Results

1 5 10 15 20
40,261 12,733 4,525 670 137

This drastic scale-back with increasing updates is unique to us.

I will comment as I find more in the other performance categories.

This is the section in question

Paging @tpolecat

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.