// Set your variables below
SHEET_NAME="MC-Import-Data"
URL="https://coinmarketcap.com/currencies/views/all/"
// Create a trigger to refresh every 5 minutes
function myFunctionA() {
ScriptApp.newTrigger("getData")
.timeBased()
.everyMinutes(5)
Integrate JMH (Java Microbenchmarking Harness) with Spring (Boot) and make developing and running benchmarks as easy and convinent as writing tests.
Wrap the necessary JMH boilerplate code within JUnit to benefit from all the existing test infrastructure Spring (Boot) provides. It should be as easy and convinent to write benchmarks as it is to write tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.http.HeaderElement; | |
import org.apache.http.HeaderElementIterator; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.config.Registry; | |
import org.apache.http.config.RegistryBuilder; | |
import org.apache.http.conn.ConnectionKeepAliveStrategy; | |
import org.apache.http.conn.socket.ConnectionSocketFactory; | |
import org.apache.http.conn.socket.PlainConnectionSocketFactory; | |
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Logback: the reliable, generic, fast and flexible logging framework. | |
* Copyright (C) 1999-2011, QOS.ch. All rights reserved. | |
* | |
* This program and the accompanying materials are dual-licensed under | |
* either the terms of the Eclipse Public License v1.0 as published by | |
* the Eclipse Foundation | |
* | |
* or (per the licensee's choosing) | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Create a scheduler to add new routes | |
@Scheduled(fixedRate = 300000) | |
public void updateHttpRoutes() { | |
Set<HttpRoute> routes = poolingHttpClientConnectionManager.getRoutes(); | |
for (HttpRoute route : routes) { | |
httpMetricsTracker.add(route, poolingHttpClientConnectionManager); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClientBuilder; | |
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
@Configuration | |
public class ClientHttpPoolConfiguration { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.text.ParseException; | |
import java.text.SimpleDateFormat; | |
import java.util.HashMap; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class ApacheLogParser { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat access.log | awk -F\" '{print $2}' | awk '{print $2}' | sed '/^$/d' | sed 's/\?.*//g' | sort | uniq -c | sort -rn > url_hits.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.iteratec; | |
import org.hibernate.BaseSessionEventListener; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
/** | |
* Modified to make the output remotely readable; directly use the slf4jLogger we use in our project. | |
* Use by calling sessionFactory.getSessionFactoryOptions().getBaselineSessionEventsListenerBuilder().setAutoListener(IteratecStatisticalLoggingSessionEventListener.class); |