summaryrefslogtreecommitdiffhomepage
path: root/benchmarks/workloads/node/index.js
blob: 584158462d0eaa909fcca3424f7248144e9edf78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
'use strict';

var start = new Date().getTime();

// Load dependencies to simulate an average nodejs app.
var req_0 = require('async');
var req_1 = require('bluebird');
var req_2 = require('firebase');
var req_3 = require('firebase-admin');
var req_4 = require('@google-cloud/container');
var req_5 = require('@google-cloud/logging');
var req_6 = require('@google-cloud/monitoring');
var req_7 = require('@google-cloud/spanner');
var req_8 = require('lodash');
var req_9 = require('mailgun-js');
var req_10 = require('request');
var express = require('express');
var app = express();

var loaded = new Date().getTime() - start;
app.get('/', function(req, res) {
  res.send('Hello World!<br>Loaded in ' + loaded + 'ms');
});

console.log('Loaded in ' + loaded + ' ms');
app.listen(8080, function() {
  console.log('Listening on port 8080...');
});